Another permissions question... Another permissions question...
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Another permissions question...

Started by CodeDog, July 01, 2012, 03:58:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

CodeDog

First, I've tried reading through the docs multiple times for this, as well as reading through all the permission related threads I could find here, but seem to be brain locked as far as figuring out this simple thing.

I just downloaded and installed Coppermine a couple days ago (latest version as of today) - great script.  I was able to modify the necessary code files and make all the menu changes, etc., I needed without any problem - nice code.  Here's where I'm having a problem:

I have one category with four albums.  One of the albums is a 'general' album, the other three are specific to groups.  I've created three groups, and I've created three users (besides admin) and assigned them to each related group.  I want guests and logged in users to be able to view all four albums, but I'm trying to assign file upload rights to each of the three non-general albums to the three individual groups/users.

General album - viewable by all, logged in or not, files can only be uploaded by admin.

Geocachers album - viewable by all, logged in or not, files can only be uploaded by Geocachers group/user.

Bikers album - viewable by all, logged in or not, files can only be uploaded by Bikers group/user.

Kayakers album - viewable by all, logged in or not, files can only be uploaded by Kayakers group/user.

I've been playing with this for two days, and for some reason just can't hit the right combination of permissions to get where I want to go.  Finally hit the burned out point and figured I'd just ask.  Any help or push in the right direction on this would be very much appreciated, thanks...
If a married man, alone in the woods, says something and there's no one there to hear it, is he still wrong?

Αndré

Unfortunately, it's not possible to set such detailed upload permissions to albums out of the box. You could either allow all users to upload to a "public" album or just the owner.

Alternatively, you could create a category for each user group. That way, your users (and just the users who belong to the correct group) can create their own albums in that category.

CodeDog

Thanks, Αndré.  I thought that was going to be the answer (not possible).

The problem is I need to predefine three specific users who basically would have no abilities except to upload files to their specific album, but still be able to view all albums (along with guests).

I created the three groups and users along with the three albums, and I modified the menu so the options were limited to only this, but couldn't figure out the permissions combination.  I also tried creating three categories and placing each album in its own category, but couldn't quite get it that way either.

This is for a site where I don't want anyone to be able to create any albums, register new users, or anything other than upload files.

Thanks again for the info...
If a married man, alone in the woods, says something and there's no one there to hear it, is he still wrong?

Αndré

Quote from: CodeDog on July 02, 2012, 06:25:49 PM
I need to predefine three specific users who basically would have no abilities except to upload files to their specific album
That's quite easy. If I understood it correctly, you don't need the different user groups. Try this:


  • Create the three users
  • Set the category permissions so that registered user (or which group(s) your users belong to) can create albums in it
  • Create each album with each user
  • Revoke the permissions from the category
  • Try to uploads files with each user

CodeDog

Quote from: Αndré on July 02, 2012, 06:39:03 PM
That's quite easy. If I understood it correctly, you don't need the different user groups. Try this:


  • Create the three users
  • Set the category permissions so that registered user (or which group(s) your users belong to) can create albums in it
  • Create each album with each user
  • Revoke the permissions from the category
  • Try to uploads files with each user

Thanks again, Αndré.  But, I'm not quite sure what you're telling me to do.  Maybe if I tell you what I've done:

I've created three groups - Geocachers, Bikers, and Kayakers.

I've created three users - Geocachers, Bikers, and Kayakers, and assigned each user to their respective group.

I created one category, and in that category I have four albums - General, Geocachers, Bikers, and Kayakers.  I started out with four categories with one album in each, but couldn't get that to work either.

I want anyone (Guests or logged in users) to be able to view all categories and albums at all times.

I want to give a username and password to each of the three users, so multiple people can log in under each name.  Any Biker can log in under the Bikers user account, for example.

When logged in under any of the three usernames, I want that user to be able to view any of the albums, but be able to upload files only to the respective album.  E.G. the 'Bikers' user can view everything, but can only upload files to the Bikers album, etc.

I don't want anyone to be able to edit or delete files, because there will be multiple people logging in under each user name.  Only upload ability.

I've already modified the menu system so that Guests only have Login or Search options, and the user menu so they only have Upload, Logout, and Search options.

When someone logs in using one of the three user names, I want them to be able to view all four albums, but when Uploading a file I want them to be able to only see the respective album available - Bikers album for the Bikers user, Geocachers album for the Geocachers user, and Kayakers album for the Kayakers user.

If going back to four categories for each of the four albums will do that for me I'd be glad to switch back (rather than one category with four albums), but I couldn't get it to work correctly that way either.  Maybe it just can't be done in Coppermine?
If a married man, alone in the woods, says something and there's no one there to hear it, is he still wrong?

Αndré

Quote from: CodeDog on July 02, 2012, 10:42:36 PM
I don't want anyone to be able to edit or delete files
You'll have to modify your gallery. There's already a solution somewhere in our boards. Please search for it. Additionally, please consider to remove the possibility that users can change their password (that mod is also available in our boards).


Quote from: CodeDog on July 02, 2012, 10:42:36 PM
I created one category, and in that category I have four albums - General, Geocachers, Bikers, and Kayakers.

  • Please delete the Geocachers, Bikers, and Kayakers albums
  • Open the category manager and allow your users' user groups to create albums in your category
  • Logout
  • Login as "Geocachers"
  • Create the album "Geocachers"
  • Logout
  • Repeat step 4-6 with the other users
  • Login as admin
  • Open the category manager and revoke the permissions you set in step 2
  • Logout
  • Try to upload some files with Geocachers, Bikers, and Kayakers user

CodeDog

Αndré, thanks for the detailed explanation.  Appreciate it, and will try that now.

I'd already removed all options for users to be able to access their profile in any way, as well as most other options.  The code is pretty easy to work with.

I'll let you know how it goes, and thanks again...
If a married man, alone in the woods, says something and there's no one there to hear it, is he still wrong?

CodeDog

Well Αndré, what I ended up doing was just creating one login (user) for all three groups, putting all four albums in one category, and giving that user rights to upload to any of the three albums (with instructions to please choose their respective album).  I'm sure mistakes will be made, but nothing I can do about it.

Not quite what I wanted, but it will have to do for now.  Again, appreciate the help and replies...
If a married man, alone in the woods, says something and there's no one there to hear it, is he still wrong?

Αndré

Why don't you use the setup is suggested? What's the problem?