TinyPortal

Development => Support => Topic started by: emanuele on November 14, 2012, 01:54:12 PM

Title: categories restriction
Post by: emanuele on November 14, 2012, 01:54:12 PM
I'm sure the answer is already out there and I feel stupid asking this question, but today I'm completely dumb and cannot find it... lol
So sorry. ;)

Is there any way in TP to disallow/deny a user to post an article in a certain category?
Title: Re: categories restriction
Post by: IchBin on November 14, 2012, 05:36:01 PM
If it's a user (non admin, or no permission to manage articles) they shouldn't get the option to select any category. The category will have to be selected upon approval by admin, or person with manage articles permission.

Title: Re: categories restriction
Post by: emanuele on November 14, 2012, 10:26:18 PM
It was to sort of define some roles (and make things easier to some people that may not be particularly tech-savvy): in other words some people would have shorter list of categories depending on where they have more needs to post in.

So let's say: groupA is responsible to post in catA and catB it would see in the dropdown only catA and catB, groupB is responsible for catC and catD and the dropdown contains only catC and catD.

I think I'll add the option...one day or another. :P
Title: Re: categories restriction
Post by: IchBin on November 14, 2012, 11:14:16 PM
Yeah I see what you are saying. Could be a useful option to have I suppose.
Title: Re: categories restriction
Post by: ZarPrime on November 15, 2012, 04:15:34 AM
emanuele, you could put this into our bugtracker as a feature request for the next version if you are so inclined --> http://www.tinyportal.net/index.php?project=1;area=issues

Be sure to reference this topic in your feature request.  If you don't know how to use our bugtracker to put in a feature request, let us know and one of us can add it for you.

ZarPrime
Title: Re: categories restriction
Post by: emanuele on November 24, 2012, 10:58:34 PM
The day I'll be in a good mood I'll give a try and code something.
It shouldn't be that difficult (except for understand exactly where to put the code :P).

It would need:
1) a new columns in tp_variables (no way I'm going to use a valueSOMETHING column... :P),
2) another list of groups in the category creation (that's easy, the data is there, just need a new name for the checkboxes, just template),
3) a bit of processing on receiving the form,
4) a find_in_set when creating the article page to find the categories (and a bit of processing when receiving the form to be sure the user has selected a category he can create articles in).

But probably such change would require also to merge the post page for the members with and without manage_articles permission (that could be possible (and should be done) even now, but it's more meaningful with this feature).

/me keeps this topic unread to not forget about it O:)