Page 1 of 1

Permissions

Posted: Tue Feb 28, 2006 3:05 pm
by sir17
On the demo http://demo.s9y.eparticipation.com I am creating, I want to set up a really basic user, that can write basic articles but has no access to other features. The permissions for the event plugins seem to not work correctly. Can't save them from the configure plugins menu. I changed the permissions in mysql so I am the only person who can use static pages, email submission etc. but all of these features are still available for everybody. Am I missing something?
Thanks for your help again.
Chris

Re: Permissions

Posted: Tue Feb 28, 2006 3:36 pm
by garvinhicking
Hi!

Actually the permissions in the plugin configuration will only be saved if you change the dropdown and check the checbkox next to it and then click on "Save".

However, those permissions do not affect accessibility of a plugin, they only indicate which user is the owner of a plugin and is able to CONFIGURE the plugin, not USE it.

Most of the plugins like static pages do not have a permission management so they are available to all users. Some other plugins only show their content to Chief editor or Admin users.

For plugins like the staticpage plugin you would need to edit the PHP file to make it viewable for specific users only.

All plugin PHP files contain a statement like this:

Code: Select all

                case 'backend_sidebar_entries':
                    $this->setupDB();
                    echo '<li><a href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=staticpages">' . STATICPAGE_TITLE . '</a></li>';
                    break;


You could modify this to:

Code: Select all

                case 'backend_sidebar_entries':
                    if ($serendipity['authorid'] != 1) return true;
                    $this->setupDB();
                    echo '<li><a href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=staticpages">' . STATICPAGE_TITLE . '</a></li>';
                    break;


To only make the static page functionality available for Author #1.

Most of the plugins are going through changing for supporting user permissions in the past and future, so it is only a matter of time until this gets widely adopted.

Best regards,
Garvin

Thanks

Posted: Tue Feb 28, 2006 3:45 pm
by sir17
that's great, thanks