Page 1 of 1
Help with users and permissions?
Posted: Sun Jan 01, 2006 6:39 am
by Robert Sanders
Hello,
I've been playing with serendipity and plug ins all day. Whats the magic combo to allow users to self sign up, but only submit entries? Right now, the closest I can get gives them access to Polls and other places I don't want them.
Thanks
Re: Help with users and permissions?
Posted: Sun Jan 01, 2006 4:06 pm
by garvinhicking
Sadly there is a problem with older plugins (like the polling) which does not have a specific usermanagement to restrict users.
Your best choice would be to create a usergroup with only rights to create entries. Then install the "User Self-Registration" plugin (event and sidebar) and set up the plugin to use the usergroup you created. And set them up to just be "Editors" and not Chief-Editors or Admins.
Then you'll need to tell me which plugins (like polls) show up in your admin panel, and I'll try to find a way to block it from non-editor users.
Best regards,Garvin
Posted: Sun Jan 01, 2006 8:12 pm
by Robert Sanders
Thanks!
That is exactly what I have done already.
Polls show up, RSS aggretor, cached entry
If you can get me a good rundown on one or two I can hack the rest i bet. I had a feeling I would need to do exactly that, but looking at the code is confusing at first. I am _not_ a programmer, but I can hack what I need into shape

Posted: Mon Jan 02, 2006 11:25 am
by garvinhicking
Hi Robert!
Patching the code is actually quite easy. Just open the plugin file of the one that's causing the display, and look for a code like:
Code: Select all
case 'backend_sidebar_entries':
echo '<li><a href="?serendipity[adminModule]=event_display&serendipity[adminAction]=poll">' . PLUGIN_POLL_TITLE . '</a></li>';
return true;
break;
just change that to:
Code: Select all
case 'backend_sidebar_entries':
if ($serendipity['userlevel'] >= USERLEVEL_CHIEF) {
echo '<li><a href="?serendipity[adminModule]=event_display&serendipity[adminAction]=poll">' . PLUGIN_POLL_TITLE . '</a></li>';
}
return true;
break;
So you just add that IF statement to check the userlevel. I've just committed new versions of aggregator and pollbox plugins to support this.
The entryproperties plugin of serendipity nightlies already supports that check, BTW [the cached entries item].
HTH,
Garvin
Posted: Tue Jan 03, 2006 4:33 am
by Robert Sanders
Hello,
This statement never returns true for me (loged in as admin, cannot see link)
Serendipity 0.9.1 and PHP 4.4.1
Posted: Tue Jan 03, 2006 10:38 am
by garvinhicking
Are you sure your userlevel is "Admin"? Remember that the userlevel is not related to the userGROUP you are in!
What does $serendipity['userlevel'] contain in your statement case?
Regards,
Garvin