I imported all of my gallery1 albums into gallery2. Unfortunately, since I was using a content management system, none of the users were imported. So, basically, all albums and pictures are owned by Gallery Administrator. I created a regular user and changed permissions on the album that the user should own. There is only one problem. This change doesn't seem to take effect on any of the underlying subalbums or the pictures. Is there anyway to have this change affect the children albums and pictures? If not, is there any way I can change this information programatically? Where is this information (the owner of the file/album) stored in gallery2?
Thanks!
jason
----
Gallery URL (optional):
Gallery version: Latest nightly v2
Webserver (with version): Apache 2
Datatabase (with version): Mysql
PHP version (eg 4.2.1):
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system:
Web browser/version:
Posts: 7994
I think that the migration tool will try to match up usernames, so if you manually create users with matching names before trying to import then I think it will line them up for you. Give that a shot.
Posts: 20
There's no way to do this after-the-fact?
Posts: 20
Didn't work... migration tool apparently didn't match usernames.
Posts: 974
G1 does not record uid <-> username matchups from CMSes when it is embedded, so the migration module doesn't have any info to do the username lookups. Until G1 does this I will not be supporting migration of CMS user permissions in the migration module.
Posts: 20
Is there any possible way (in G2) to do a recursive permission change?
Posts: 32509
tsorf33, what does this have to do with the migration module? And recursive in respect to what? Album->Subalbum->....->Item recursive or Group->User "recursive"?
Posts: 20
valiant,
See the ORIGINAL message. I wasn't asking about the migration module. I was asking how to change the permissions recursively for EVERYTHING (subalbums, pictures, videos, etc.). I was wondering if there was someway to do this (that I missed somehow) and if so, how? Else, is something like this planned? A recursive permission change seems to be a necessity IMO.
Posts: 974
There should be a checkbox on the permissions page to apply the changes to the item and all its children and childrens children. Try it out - I assume that it is completely recursive.
Posts: 20
I used that checkbox (I believe it appears below the username textbox) on the last build I had downloaded, but it did not change the permissions recursively. I will take a look at the latest nightly build and see if it is working in that version.
Thanks!
Posts: 314
tsorf33, wouldn't it be better if you could change the owner of the sub-albums? If you want all albums to be owned by this new user that you created - it's just single statement. If you have several album trees that should be owned by different users - it's a litle more complex, but quite doab;e nevertheless.
Changing permissions recursively should work, no questions about it - but is it what you really want?
Posts: 20
Perhaps I didn't state my problem well enough. :oops: What I'm actually trying to do is to change the OWNER of an album (AND all of the sub-albums and pictures contained within). When I go to the 'Edit Permissions' page, I can see where I can change the Owner (it appears above the checkbox for recursiveness -- which leads me to believe that perhaps ownership is INTENDED to not be recursive?). When I change the owner, it does not change the ownership of the sub-albums and pictures beneath the album. I have just confirmed this with the latest version of G2. Sorry if I wasn't being clear in my terminology earlier.
My problem is this -- I have several Gallery 1 users. Each of them is given ONE album. They, in turn, create sub-albums under this album (and pictures under those sub-albums). Since I'm using an embedded Gallery 1, the users are not migrated from Gallery1 to Gallery 2. Therefore, all albums and pictures are owned by 'Gallery Administrator'. What I would like to do is to import all of the current pictures from Gallery1, have the users create new Gallery2 accounts, then recursively change the ownership of the album which they should own. I suppose I could just give them PERMISSION to do whatever to the albums and sub-albums easily (assuming permissions work recursively -- which I believe they probably do). But, I'd rather change the ownership, so that they actually own all of the pictures, etc. If there's not a good way to do that, I'll give up and just try the permission route.
Thanks again all!
Posts: 314
that's exactly what I thought you wanted to do - changing the owner. Then I got confused with subsequent posts... so no need to apologize! How familiar are you with SQL? You can set the owners for "top" albums (I presume they are all just under root level). Assuming you are using MySQL, I can put together couple statements that will do the job. (of course, with usual legalese disclaimers - take a backup, I am not responsible, I am just a big-eared creature that you can't find anyway, blah blah blah) :wink:
Posts: 20
Strangely enough, I tried that. That's actually why I posted to the list. I suppose I didn't know the schema well enough. But, in the g2_item table, I ended up changing the g_ownerId to the id of the new owner. But, nothing changed in the webpage. I was frustrated by this and just decided to post to the list. Oh well!
Posts: 8601
you must click FlushCache on lib/tools/test/index.php after changing anything directly in the database..
Posts: 20
Eh? How do I do that? I thought there might be some caching issues, but I figured restarting Apache might cause the cache to flush. Guess not. Can you let me know how to do that? I'd greatly appreciate it!
EDIT: Oh, do I just surf to that link in G2? I'll try that. No need to repond if that is the case.
Thanks!
Posts: 46
Hi,
There is detailed Gallery permission article, include how to set up Gallery permission video.
Enjoy,
Create Web Album.