guest can't view album after upgrade

kodakculture

Joined: 2004-12-23
Posts: 7
Posted: Tue, 2005-03-15 03:27

i recently did the alpha->beta upgrade (with the latest alpha that supports upgrade path) and everything seemed fine.

but! guest user (eg. not logged in, eg "Everybody")cannot view albums, even though permissions are set to "Everybody"!! i am sure that my permissions are set correctly, they worked in g2alpha. i have one root album that nobody except admin can see, then useralbums under that that can be seen by everybody. these are giving the error. when i log in as admin or album owner, i see everything fine.

The action you attempted is not permitted.

Error Detail -

Error (ERROR_PERMISSION_DENIED) :
in modules/core/classes/helpers/GalleryUserHelper_simple.class at line 68 (gallerystatus::error)
in modules/core/classes/GalleryCoreApi.class at line 373 (galleryuserhelper_simple::asserthasitempermission)
in modules/core/classes/helpers/GalleryItemHelper_advanced.class at line 643 (gallerycoreapi::asserthasitempermission)
in modules/core/classes/GalleryCoreApi.class at line 1450 (galleryitemhelper_advanced::fetchalbumtree)
in modules/albumselect/module.inc at line 96 (gallerycoreapi::fetchalbumtree)
in modules/core/classes/GalleryLayout.class at line 711 (albumselectmodule::loadsystemcontent)
in layouts/matrix/layout.inc at line 263 (matrixlayout::loadlayouttemplate)
in layouts/matrix/layout.inc at line 155 (matrixlayout::_loadalbumtemplate)
in modules/core/ShowItem.inc at line 136 (matrixlayout::loadtemplate)
in modules/core/classes/GalleryView.class at line 246 (showitemview::loadtemplate)
in main.php at line 286 (showitemview::doloadtemplate)
in main.php at line 46
in main.php at line 39

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2005-03-16 06:22

That's surprising. I haven't seen a bug in that code in a while. Would it be possible for me to get admin access to your G2 so that I can experiment with it and see if I can reproduce/understand the problem? Thanks!

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2005-03-17 03:11

Thanks for sending me the auth info. When I look at your G2, I see that I have to log in immediately. So I login as your admin user and I verified that this is indeed a bug. The "julia" album has permissions so that all users can see it, but yet the guest user can't get in. Bug!

Turns out that this is caused by the albumselect module. It has a cow if it can't get access to the root album. I made it work by just skipping rendering the albumselect list in this case. Try updating to the next nightly build to see it. This effectively makes that block useless for your users, though :-(

 
kodakculture

Joined: 2004-12-23
Posts: 7
Posted: Thu, 2005-03-17 22:49

so maybe i will move all the useralbums into a seperate subalbum
then? but i like having the sensical urls of domain.com/g2/
username. as you can see right now i have every user set up with
their own install of G1, because i want them to have control over
their own gallery. in G2 i would like to move them all to the same
install. so how to do this without allowing guest access to the root
album? sometimes it is not advisable to let guest see root, because
i don't want there to be a "homepage" where everybody's gallery is
seen... not everybody wants that.

peter

 
kodakculture

Joined: 2004-12-23
Posts: 7
Posted: Fri, 2005-03-18 03:12

ok, i see what you are saying, sorry. this is an add-on module. so i just disabled it. it does make sense that it freaks out when rendering the root list. nevermind my previous post, because of course in my situation i don't want users seeing an albumselect list anyway. i want each user album to appear, as much as possible, as a separate install of gallery.

 
kodakculture

Joined: 2004-12-23
Posts: 7
Posted: Fri, 2005-03-18 03:14

oh... i did have a question though. if i already have "user albums" and i then enable the module, how can i tell gallery that a preexisting album is that user's useralbum? is there a flag in the DB somewhere? i suppose i could dig deeper... if you don't have time to answer my Qs. thanks again bharat.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2005-03-18 08:21

Unfortunately, there's no way short of hacking the database. We can add an admin feature for this, though if you file a feature request...

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-03-18 15:55

if you do want to go to the db, you'll want a row in g2_PluginParameterMap with:
module useralbum albumId {id-of-album} {id-of-user}
for pluginType, pluginId, parameterName, parameterValue, itemId