Problems making a new album with Gallery Remote.

Torbjorn

Joined: 2003-08-01
Posts: 2
Posted: Fri, 2003-08-01 18:37

I'm having a problem with Gallery Remote ver 1.1b14 for Windows.
It will NOT let me create a new album. I have to log on via web (IE) and create a new album there before using GR to add pictures.
This was also the case in ver 1.1b13.
The gallery is powered by Gallery 1.3.4 (Christian's gallery, yes we are related).
When I try to create a new album, it tries to do it in the ROOT directory of the gallry, and I do not have the rights to add albums there. Yes, I HAVE entered the correct sub album to create the new album in, but still it does not work.
I assume this is a bug, or if not, not very intuatively made (I do not read manuals unless I have to!!).
----
Give us your Gallery/webserver information to get a faster answer.
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful): http://h0bbel.p0ggel.org/gallery/
Gallery version: 1.3.4
Apache version: dunno
PHP version (don't just say PHP 4, please): dunno
Graphics Toolkit: dunno
Operating system: Linux something
Web browser/version (if applicable): n/a

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Fri, 2003-08-01 18:46

Please post in the correct forum next time. Moving...

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Tue, 2003-08-05 10:42

Torbjorn, could you post the log of a session where you try to do this?

You'll have to read some of the manual to find out how to do this, sorry :-)

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2003-08-05 10:46

Torbjorn, the docs are here

:)

 
Torbjorn

Joined: 2003-08-01
Posts: 2
Posted: Wed, 2003-08-06 17:41
paour wrote:
Torbjorn, could you post the log of a session where you try to do this?

You'll have to read some of the manual to find out how to do this, sorry :-)

Sorry, but I feel that logfile reveals far more information than I'm prepared to publish here. So I'm afraid we will just have to live with the problem I guess. Or can you be specific in which of the almost 1800 lines from the log you require?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Wed, 2003-08-06 18:10

Issue sorted.

The problem was that the user did not have the main "can create sub-albums" permission, but had the permission in the album at hand.
Changed that setting, and everything was fine.

Figured this out while troubleshooting at home. BUT, why would he be able to create albums using the web-interface? And, from the GR logs:

album.name.47=Farfars-bilder
album.title.47=Farmor og farfar sine bilder.
album.parent.47=0
album.perms.add.47=true
album.perms.write.47=true
album.perms.del_item.47=true
album.perms.del_alb.47=true
album.perms.create_sub.47=true

and then:

75703|TRACE|GalComm2 |Still logged in to http://h0bbel.p0ggel.org/gallery/
75703|INFO |GalComm2 |Getting album information from http://h0bbel.p0ggel.org/gallery/
75703|TRACE|GalComm2 |new-album parameters: [HTTPClient.NVPair[name=cmd,value=new-album], HTTPClient.NVPair[name=protocol_version,value=2.3], HTTPClient.NVPair[name=set_albumName,value=Farfars-bilder], HTTPClient.NVPair[name=newAlbumName,value=test2], HTTPClient.NVPair[name=newAlbumTitle,value=test], HTTPClient.NVPair[name=newAlbumDesc,value=test of new album]]
75703|TRACE|GalComm2 |Url: /gallery/gallery_remote2.php
75703|TRACE|GalComm |Sending cookie: PHPSESSID=4e7d7ff3728d573385ddce98ef55952f; path=/; domain=h0bbel.p0ggel.org
76563|TRACE|GalComm2 |#__GR2PROTO__
status=501
status_text=A new album could not be created because the user does not have permission to do so.

Clearly there is a mis-communication between the two different sub-albums permissions, leaving everyone confused.

Anyway, Paour, not your fault. :)

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Wed, 2003-08-06 22:54

Thanks h0bbel. I'll have to fix that soon...

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Sat, 2003-09-20 07:13

This is now tracked by this task.

 
Muti

Joined: 2002-12-14
Posts: 10
Posted: Sat, 2003-09-20 22:00

Fixed in latest CVS..

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Sun, 2003-09-21 18:00

Muti means that this problem is fixed in Gallery (not Gallery Remote) 1.4.1 beta builds. You can get access to beta builds on the Gallery download page on gallery.menalto.com.

 
benjamin
benjamin's picture

Joined: 2003-09-29
Posts: 5
Posted: Mon, 2003-09-29 07:50

Hi all,

I urgently needed this feature (allowing users to create sub-albums under postnuke using gallery remote) and I found a solution using another post from JDOG and then adding an if clause in the albums.php.
This will only permit user Admin to create top-level albums but will enable your users to create sub-albums ... so it's a 'quick and dirty' fix ...

orginal post (so do this first):

---

Post by JDOG on Jul 18, 2003 - 11:33 PM

If you would like normal users to create top level photo albums (as the original quested asked), here is your solution:

Edit modules/gallery/classes/postnuke0.7.1/Users.php
Find this line:

$this->canCreateAlbums = 0;

Change to:

$this->canCreateAlbums = (pnSecAuthAction(0, 'Gallery::', '::', ACCESS_ADD));

Now go to the PostNuke Administration Menu.
Click on Groups
Click on Add a new group
Name the group gallery_users (or whatever you like)
Click new group
Then add the users which you want to this group.

Now return to the Administration menu and click on Permissions
Click on "New group permission"
Under group select gallery_users
Under Component enter-> Gallery::
Under Instance enter-> ::
under permission level select-> Add

---

Then add an 'if' clause in the albums.php where the CreateAlbums code is because otherwise all users have access to creating top-level albums... we only want Admin to be able to do this :

replace in ./albums.php:

if ($gallery->user->canCreateAlbums() && !$gallery->session->offline) {
	$adminCommands .= "<a href=" . doCommand("new-album", array(), "view_album.php") . ">[". _("new album") ."]</a>&";
}

by

if ($gallery->user->isAdmin()){
	if ($gallery->user->canCreateAlbums() && !$gallery->session->offline) {
		$adminCommands .= "<a href=" . doCommand("new-album", array(), "view_album.php") . ">[". _("new album") ."]</a>&";
	}
}

hope this helps out some people ...

grtz,

Benjamin