Restrict Guest account to 1 album? Restrict Guest account to 1 album?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Restrict Guest account to 1 album?

Started by adarack, January 28, 2011, 02:04:02 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

adarack

Hey all,

Is it possible to restrict the Guest account to be able to view only 1 album or to restrict registered users from making albums public so only Admin can make photos and albums public? 

I have set Public albums upload in groupmgr.php to no for all but Admin but in the Album properties they can still be set to everyone (public).

Coppermine Link: http://gallery.shannonssong.com

user: coppermine pass: coppermine for testing.

Thank you.

Αndré

Quote from: adarack on January 28, 2011, 02:04:02 AM
Is it possible to restrict the Guest account to be able to view only 1 album
Set the album permissions accordingly (Album can be viewed by xyz).


Quote from: adarack on January 28, 2011, 02:04:02 AM
Is it possible to restrict registered users from making albums public so only Admin can make photos and albums public? 
Disable 'Public albums upload' and 'Personal gallery' in the groups manager.


Quote from: adarack on January 28, 2011, 02:04:02 AM
user: coppermine pass: coppermine for testing.
Doesn't work.

adarack

Thank you for the reply. 

I forgot that I had my gallery set to use only email not username.  Sorry about that.  The test account works now.  User: coppermine Pass: coppermine

I'm guessing by your reply that there is not way to maintain personal galleries while only allowing admin to create fully public galleries?  I can see how this would work but at a lose of some functionality that I would like to keep.

Is it possible to prevent registered members from creating public albums?     

Αndré

Quote from: adarack on January 29, 2011, 02:31:50 AM
Is it possible to prevent registered members from creating public albums?      
That's the default behavior. They can only create public albums if you enable it in the category manager. Seems that I misunderstood your question initially, sorry.

adarack

Hmm, then I must have screwed up somewhere.

In the categories manager registered members are allowed create albums in 4 out of 5 categories.  The 5th one is the only one I wish to be viewable by guests and only admins should be able to create albums in it or any public album.

I have manually set all the current albums to be viewable to registered members only. 

I have it set in groupmgr.php that registered members cannot upload to public albums.

But the problem I seem to be having is that when a registered member creates an album in any category they are able to set it to be viewable to everyone including guests in the album properties.  And it is viewable to a guest.  I have tested this in 2 test accounts.

I am including screenshots of the groupmgr.php and the album creation screen under the coppermine account.

I'm sorry if I'm simply missing something.

Thank you.

Αndré

So what you try to accomplish is that when registered users create albums they should be only visible by registered users by default and the creator of that album cannot change that? If all of your albums have restricted access, why don't you just disable your gallery for guests (force login on visit)? Or is that your actual question, how you can restrict guest access to all album, but one?

adarack

Quote from: Αndré on January 30, 2011, 09:08:29 AM
So what you try to accomplish is that when registered users create albums they should be only visible by registered users by default and the creator of that album cannot change that?

That is exactly what I am trying to do. 
I wish to have 1 public album viewable to guests that only admins can control. 
All other albums only viewable to registered users.
Registered users should not be able to create public albums at all.  Only private and viewable to registered members.

Quote from: Αndré on January 30, 2011, 09:08:29 AM
If all of your albums have restricted access, why don't you just disable your gallery for guests (force login on visit)? Or is that your actual question, how you can restrict guest access to all album, but one?

I have had my gallery set to force login with no guest access.  But I have a few photos that I would like viewable by guests.  I still need the rest of the gallery secure.

Thank you.

Αndré

Open delete.php, find
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description, owner) VALUES ('$category', '$get_album_name', 'NO', '{$position}', '', '$user_id')";
and replace with
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description, owner, visibility) VALUES ('$category', '$get_album_name', 'NO', '{$position}', '', '$user_id', '2')";


Open modifyalb.php, find
    } else {
   
        $options = array(
            0 => $lang_modifyalb_php['public_alb'],
            FIRST_USER_CAT + USER_ID => $lang_modifyalb_php['me_only'],
        );

and replace with
    } else {
   
        $options = array(
            //0 => $lang_modifyalb_php['public_alb'],
            FIRST_USER_CAT + USER_ID => $lang_modifyalb_php['me_only'],
        );

adarack

Thank you so much for the reply.  It will still be a few more days before I have a chance to try it out. 

adarack

Sorry it took so long to try out this code.  It works perfectly.  Thank you again for all your help.