Advanced search  

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

Pages: [1]   Go Down

Author Topic: Restrict Guest account to 1 album?  (Read 8925 times)

0 Members and 1 Guest are viewing this topic.

adarack

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Shannon's Song
Restrict Guest account to 1 album?
« on: January 28, 2011, 02:04:02 am »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Restrict Guest account to 1 album?
« Reply #1 on: January 28, 2011, 11:38:27 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).


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.


user: coppermine pass: coppermine for testing.
Doesn't work.
Logged

adarack

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Shannon's Song
Re: Restrict Guest account to 1 album?
« Reply #2 on: January 29, 2011, 02:31:50 am »

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?     
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Restrict Guest account to 1 album?
« Reply #3 on: January 29, 2011, 10:42:35 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.
Logged

adarack

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Shannon's Song
Re: Restrict Guest account to 1 album?
« Reply #4 on: January 30, 2011, 03:07:23 am »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Restrict Guest account to 1 album?
« Reply #5 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? 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?
Logged

adarack

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Shannon's Song
Re: Restrict Guest account to 1 album?
« Reply #6 on: January 30, 2011, 04:42:42 pm »

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.

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Restrict Guest account to 1 album?
« Reply #7 on: February 04, 2011, 11:51:33 am »

Open delete.php, find
Code: [Select]
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description, owner) VALUES ('$category', '$get_album_name', 'NO', '{$position}', '', '$user_id')";and replace with
Code: [Select]
$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
Code: [Select]
    } else {
   
        $options = array(
            0 => $lang_modifyalb_php['public_alb'],
            FIRST_USER_CAT + USER_ID => $lang_modifyalb_php['me_only'],
        );
and replace with
Code: [Select]
    } else {
   
        $options = array(
            //0 => $lang_modifyalb_php['public_alb'],
            FIRST_USER_CAT + USER_ID => $lang_modifyalb_php['me_only'],
        );
Logged

adarack

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Shannon's Song
Re: Restrict Guest account to 1 album?
« Reply #8 on: February 07, 2011, 01:29:29 am »

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

adarack

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Shannon's Song
Re: Restrict Guest account to 1 album?
« Reply #9 on: February 10, 2011, 02:42:54 am »

Sorry it took so long to try out this code.  It works perfectly.  Thank you again for all your help.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.