Category Permissions

Post Reply
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Category Permissions

Post by garvinhicking »

I just committed support to Serendipity 0.9-alpha5 SVN that allows you to configure read/write support for each category to specific usergroups.

Now you can say "Group A, B and C have access to Category A and B. Only Group D has access to Category C.". And this can also be applied on the frontend, so authors may be able to read all posts in Category A and B, but not C. Note that the last feature is an option that you can toggle in your s9y configuration, because if you enable it it will cause additional SQL lookups to be done.

Note that this feature should play well with the feature of the entryproperties plugin that allows you to grant access to users/groups for individual entries, but this new feature is much easier to handle if you need "per-category" access privileges.

Bundled with that I upgraded that "adduser" ("User Self-Registration") to allow you to define into which user is put when registring to control his privileges. Note that this is only possible with Serendipity 0.9-alpha5.

This new functionality is considered experimental. We largely rely on your feedback for getting the privileges to work nicely.

If this feature goes along without major bugs, expect a Serendipity 0.9 beta release the next weeks, with a final release followed after that.

Now I'm off for my weekend, I'm gonna be the best man at the marriage of a good friend. :-)

(Copy of http://blog.s9y.org/archives/63-Categor ... sions.html)
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
saaryoda

access for anonymous

Post by saaryoda »

Hello Garvin ;-)
I have a problem with this plugin.
Now its only possible for registered user to read entries/categories.
Wouldnt it be better the admin can decide which group can read a certain category or if the category can read by anonymous too.
I didnt find any posibility that anonymous can read one or more categories.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: access for anonymous

Post by garvinhicking »

First off, this was a "migration" bug. When a category did not have the "All authors" checkbox checked, those categories were not readable by normal authors, but prrevious versions did show those categories. I just fixed this in new SVN.

And yes, you can decide which categories can be read by whom by editing the categories' properties and setting READ/WRITE to either a group or "All Authors". All Authors incudes anonymous users.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
japostoles
Posts: 1
Joined: Thu Dec 22, 2005 12:29 am

Post by japostoles »

I'm having a problem using the read/write permissions for categories... it seems that is ignoring the write permission. I have the following setup:

Group 1

User 1 member of Group 1

Category 1 - readable by all, writable by Group 1

If User 1 logs in and tried to write a new entry, only "No Category" shows up in the category drop down. If I manually edit the database to change the author ID for Category 1 to the ID of User 1, they get the category in their dropdown.

It seems like it only allows the owner of the category to post to it, regardless of the "write" permission setting in the category.

Any ideas?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Japostoles: Yes, sadly the category write permission management from serendipity 0.9.1 had a slight bug in this regard.

Could you please try a serendipity 1.0 nightly? Or if you're familiar with SVN you could fetch the 0.9 branch, which contains the current 0.9.2 version. This will also be released in a few weeks, I guess...

Sorry for the inconvenience,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply