coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: villain189 on October 11, 2005, 08:56:22 PM

Title: Restrict Categories based on usergroups?
Post by: villain189 on October 11, 2005, 08:56:22 PM
Hi,

I'm running 1.3.4 installed from fantastico on my host. Things are working very well so far...however, I have one question.

I created 2 Categories and have several Albums in each category. I created a usergroup 'personal' and restricted access to all of these albums to users in the 'personal' usergroup.

This part works fine, if someone is not logged in and visits they cannot view these Albums. However, they still see the Categories (Category A and Category B) which have no Albums in them. Is it possible to restrict these to a specific usergroup so that they have to be logged into see these categories?


The reason for this is...I'd like to have myself and a few others all use the same coppermine install for our photos. I could have my group which I could add some friends as users to. Someone else could have their group and add some friends to that group. Restrict access to our Categories/Albums based on usergroup and that way when someone I know logs in they only see my Categories/Albums. The way I set it up now they would only see my Albums if I did this, but they would still see the Categories (with no Albums in them) for the other people...

Is this possible?

thanks!
Title: Re: Restrict Categories based on usergroups?
Post by: Joachim Müller on October 12, 2005, 08:32:02 AM
Quote from: villain189 on October 11, 2005, 08:56:22 PM
Is it possible to restrict these to a specific usergroup so that they have to be logged into see these categories?
No

Detailed answer: it's not possible out-of-the-box. It would need core code modifications that are not easily done. You basically have to add an if/then switch in some places that checks if the visitor is currently logged in (hint: check for USER_ID).