Hi everyone!
I'm looking for some permission related things, and cant find them in the documentation, nor in the forums.
I hope someone can give me a hint!
I want to allow only each user to see its own album, and no other.
I don't want to allow guests to view users albums either.
I want to allow only one upload (1 image) per user.
Is there any option in the permissions page? or should i edit the code?
Thanks in advance!
Gallery version : 2.1.2
PHP version: 4.13
Webserver Apache 2.0.2
Database MySQL - 3.23.58
Activated toolkits: ImageMagick NetPbm, GD
Operating system : Linux
Browser: Firefox
Posts: 6
No tip what so ever?
If this is not possible with Gallery2, is there any other photo gallery software able to do it?
Regards,
Leonardo
Posts: 32509
> I want to allow only each user to see its own album, and no other.
that's an option in g2.2's useralbum module
> I don't want to allow guests to view users albums either.
covered by the above option
> I want to allow only one upload (1 image) per user.
using user-albums and allowing just one image is pretty much overkill.
anyhow, the quotas module can limit the disk-usage (size that can be used by each user in kilobytes / megabytes can be defined).
if you want to limit the number of items, you have to change the php code of this module or create your own module.
Posts: 6
So, i should use the SVN (or snapshot)? I couldnt find a RC of 2.2 in the download section, is there any somewhere else?
Regards
Posts: 32509
yes, you'll need to use the nightly snapshot of g2.2. a link to nightly snapshots is on the download page (upper right corner of this page).
Posts: 6
Thank you very much valiant!
One last question, is it ok to use this development release in a production server?
Regards
Posts: 32509
depends on how mission critical your production environment is. if your life depends on it, no. ;)
but generally, g2 development versions are very stable and well tested. and we're close to a new release which means that it's almost as stable as an official release.
you need bad luck to get a bad nightly snapshot.
Posts: 6
Again, thanks valiant.
I'm trying it right now, as my life doesn't depend on it ;)
But I have a little doubt. I hope you don't mind (I appreciate very much all the questions you have answered, and I will understand if you don't have the time to keep doing it), I found the option in usersalbums to make the default 'show' option to be "own user" only, but I also found that if the user goes to "edit permissions" for his album he can override the default one, is there any way to disable this? I don't need users to set any kind of permissions for their albums, in fact, the less permissions they have, the better
Regards!
Posts: 32509
you'll have to revoke the "edit item" permission from the user on theor own album.
you can edit a few lines of the code of the useralbum module to achieve that.
modules/useralbum/classes/UserAlbumHelper.class
after
$ret = GalleryCoreApi::addUserPermission($albumId, $user->getId(), 'core.all'); if ($ret) { GalleryCoreApi::releaseLocks($lockId); return $ret; }add
$ret = GalleryCoreApi::removeUserPermission($albumId, $user->getId(), 'core.changePermissions'); if ($ret) { GalleryCoreApi::releaseLocks($lockId); return $ret; }Posts: 6
Thats what i love about Free Software. Thanks Valiant.
I don't think its working though, users still edit permissions, is there any documentation where I can see how to manage permissions in the code? the different functions, etc.?
Posts: 32509
this doesn't affect existing user albums.
you can edit existing user albums yourself with "edit permissions".
Posts: 16
valiant,
i did just as you suggested. While i do thank you for your time i am sad to say that it did not change anything. Users still can change permissions on albums they created themselves. Would you happen to have another idea on this subject?
Thanks a TON
Eugene