Prevent users from adding images to their top level album

csspt

Joined: 2010-04-27
Posts: 3
Posted: Tue, 2010-04-27 21:28

Hello all, and congratulations on such a fine open source app!

I'm working on a project that requires each user to create sub-albums and add images into them. This is so i have separate folders under the main gallery folder, each one for each user registered. Something like this:

-- Gallery
---- User1
------ Album A
------ Album B
----User2
------ Album A
------ Album B

Each user can add items (images) to their sub-albums, but cannot add items to their main album (i.e. User1 folder), nor create sub-albums under a sub-album. They should however be able to see the thumbnails of their created sub-albums under "User1".

Maybe this is easy to do, but i cannot figure out how (maybe because i'm just starting!).

Can anybody help?

Thanks in advance.
Regards,
Carlos

UPDATE: I figured out how to prevent users from adding items to the their root album, just have to change the permissions for that particular algum. But is there a way to have this permission set (or "not set"!) by default?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2010-04-27 21:44

It wouldn't quite be their album then would it? It's going to take a lot of manual intervention for you and you having to manually create and manually edit permissions for every since album created that's under the "user level" album.

Have fun with that.

I'll let you ponder that before getting into the details of editing permissions.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
csspt

Joined: 2010-04-27
Posts: 3
Posted: Tue, 2010-04-27 22:35

Thank you for your reply, nivekiam.

I agree it will probably be a pain to set all permissions everytime a user creates a new sub-album, that's why i was wondering if such permissions could be set by default.

Each sub-album created by each user would however be "their" album, as they would be able to upload items and delete it (with the exception of their roo level album).

Anyway, i'll keep giving it a try.

Regards,
Carlos

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2010-04-27 22:51

have you looked at the module called jenspermissions (or something like that)?

 
csspt

Joined: 2010-04-27
Posts: 3
Posted: Wed, 2010-04-28 12:53

Thanks, alecmyers.
Jenspermissions looked like the solution, but after installing and tweaking i couldn't accomplish my goal.
Anyway, this looks like a greatly discussed issued, and i ended up altering the core code using these instructions: http://gallery.menalto.com/node/70844

That worked for me!

Regards,
Carlos