Add Album Permissions

theguyfrompei
theguyfrompei's picture

Joined: 2006-02-10
Posts: 12
Posted: Mon, 2006-02-13 18:49

What I'm looking for in particular is the ability to let the user set up albums and allow them to edit them, but not let them change ANY of the permissions such as "Resized Images", "Rows per album page", "Columns per album page", ect... so they can't affect the look or feel of the gallery which can in turn affect the look of the site.

If anyone has found anything on this, I'd appreciate any help I can get!

 
flipz

Joined: 2006-02-13
Posts: 24
Posted: Mon, 2006-02-13 23:52

I'd love any info on the same thing. It seems like by default g2 gives the user WAY too much access to information.

Thanks!

PS: Hopefully you don't think this is a good reply theguy, I'm just piggy-backing on your post. :P

Edit: I'm going to give some examples of things I would like to remove... without going into TOO much detail.

Under "Album actions" I basically only want them to be able to "make highlight" and delete the album. The same goes for the menu on the left. I want to remove practically all of those icons/links... even if they are the owner of the album. I want to completely remove it so they can't even get into the "edit permissions" screen, etc. And under "Edit Album," I want to remove practically everything. I want them to be able to change the keywords and summary and stuff, but they should not have any control over the size of the images, the size of the thumbnails, the theme, etc.

I know that I'm giving a very rough idea of what I'm trying to do, but I think I should be able to figure it out myself if someone at least gives me a basic idea on where to be looking for this stuff. I want to be able to remove it for every account except for admin of course.

Thanks,
-brent

 
murrdogg
murrdogg's picture

Joined: 2005-12-14
Posts: 36
Posted: Tue, 2006-02-14 20:33

Hi guys (From PEI or otherwise!)

I am interested in this information as well. Sorry I have nothing useful to add, short of letting you know there are more of use out there looking for this functionality.

Cheers,

GMurray

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2006-02-14 22:36

the "edit item" permission gives access to all 3 tabs for albums (general, album, theme).
to restrict access to theme tab you can modify modules/core/ItemEditTheme.inc, function isSupported.
maybe use GalleryCoreApi::isUserInSiteAdminGroup to decide whether to return true or false (keep the AlbumItem check too).

 
theguyfrompei
theguyfrompei's picture

Joined: 2006-02-10
Posts: 12
Posted: Fri, 2006-02-17 19:10

I have to say, going through this made me go crosseyed. This may be a little more advanced for me. I'm extremely good at following step by step instructions though... :)

Little help?

Thanks,
S.

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Wed, 2006-03-22 06:34

Wow was looking all week for this and theres very little info about it which is surprising as it does give users way to much control and is somewhat difficult to edit. Im about to dive in and see.

 
johnmont

Joined: 2006-03-20
Posts: 17
Posted: Tue, 2006-03-28 23:54

Well -- if you want a hack that allows only admins to do this, I figured on an unelegant way. The theme tab is blank, but hey.....you can't edit the theme. This is on 2.1 on an embedded site.

In core/ItemEditTheme.inc

find:

global $gallery
$ItemEditTheme= array();

under it put:

list ($ret, $isSiteAdmin) = GalleryCoreApi::isUserInSiteAdminGroup();
if (!$ret) {
return ;
}

 
johnmont

Joined: 2006-03-20
Posts: 17
Posted: Wed, 2006-03-29 00:14

even better -- this is quite useful. of courese it won't allow changing name on files on file system either...such as photos, but that's not a huge deal imho.

in core/templates/ItemEditItem.tpl:

at the top of the file change:

<div class="gbBlock">
{if $itemEditItem.can.changePathComponent}

to:

<div class="gbBlock">
{if $user.isAdmin}

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Wed, 2006-03-29 04:53

Thanks I ended up using a mix if the code in this thread http://gallery.menalto.com/node/44041 and some {if $user.isAdmin} tags :)