Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Restrict Album Creation
rmcbride@rama.com
#1 Posted : Wednesday, 3 June 2009 9:33:44 AM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

I have a website where I am happily using GSP with enableUserAlbum="true". Now, however, I want to create a Role on my website and for this role I explicitly do NOT want user albums created. Is there a way to set GSP up so that it creates albums only for users in specific roles (ie Members, Administrators, etc.)? This way I would have the site create galleries for regular members, but not for this "reduce access" role.

Thanks

Richard
Roger Martin
#2 Posted : Wednesday, 3 June 2009 12:55:13 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Unfortunately, that is not possible. The closest thing is to log in as each new user and disable their user album on their account profile page. But they can always turn it back on, so this may not be of much help.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
rmcbride@rama.com
#3 Posted : Thursday, 4 June 2009 10:01:15 PM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

Maybe I need to go at this a different way. How would I set GSP up so that users do not get an album at all, unless they specifically ask for one? Is this possible?

Thanks

Richard
Roger Martin
#4 Posted : Friday, 5 June 2009 1:37:17 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

What you can do is disable user albums. When a user requests a personal album, manually create one and set them as the owner (double click the album header to bring up the edit album popup).

That is the exact same thing GSP does when you enable user albums, except GSP does it for everyone.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
rmcbride@rama.com
#5 Posted : Friday, 5 June 2009 2:43:25 PM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

When you say "manually create an album", is there a way to do this programatically? I can't see myself manually going in and creating an album anytime someone asks for it. That would become onerous on a site of more than a few people.

I can see a scenario where the GSP home page would present users with a checkbox saying 'Make a photo album for my account". On check a textbox would be enabled saying "Name Your Album" or the routine would automatically name the album based on the persons logged in username. Then the routine would call a GSP function to create the gallery based on the request and name it based on the input.

My guess is you already have this in place. I am just not wise enough to figure out how to use it.

Thanks

Richard
Roger Martin
#6 Posted : Saturday, 6 June 2009 1:42:39 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

The checkbox you imagine already exists. It is on the user's account page and it is labeled "Enable my user album". I think what you need, though, is the option to have this unchecked by default. That is, user albums would be enabled at the system wide level but disabled for each individual user, UNLESS the user activates it on their account page. Currently, GSP is hard-coded to always create a user album when the system setting is enabled. Only when a user unchecks this box does their user album disappear.

There could be an option for administrators called "Automatically create each user's album". It would be true by default, which provides behavior the same as currently. If you uncheck it, then you get the behavior described above.

What do you think? This would be pretty easy to implement.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
rmcbride@rama.com
#7 Posted : Saturday, 6 June 2009 3:54:05 PM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

I think that is an excellent idea. That way a site could have user created albums, based on the user desire to have an album. It's always a good idea to put as much control in the hands of the end user as is reasonably possible, and this is a good area to have it. Let me know when you have this and I will implement it immediately.

Thanks

Richard
Roger Martin
#8 Posted : Monday, 8 June 2009 3:12:13 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Hey, good news! You can edit web.config to disable each user's album by default. Look for this line:

Code:
<add name="EnableUserAlbum" defaultValue="true" type="String" allowAnonymous="false"/>


Change the default value to false:

Code:
<add name="EnableUserAlbum" defaultValue="false" type="String" allowAnonymous="false"/>


I did a little testing and it looks like it does what you want. Let me know what you think.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
rmcbride@rama.com
#9 Posted : Monday, 8 June 2009 4:40:33 PM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

I installed the most recent version and made the change to my web.config. Then I logged in as a standard user. However I cannot find any checkbox labeled "Enable my user album". In fact I can't see any checkboxes at all on the User Profile page.

Thanks

Richard
rmcbride@rama.com
#10 Posted : Monday, 8 June 2009 4:43:42 PM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

Never mind. I had left EnableUserAlbum set to false when I did the new install. I set it properly and there it was.

Thanks

Richard
rmcbride@rama.com
#11 Posted : Monday, 8 June 2009 11:30:10 PM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

I think I may have found a possible bug, unless the following is the expected behaviour. Here is the process.

1. Set enableUserAlbum="true" in GSP.config.
2. Set <add name="EnableUserAlbum" defaultValue="false" type="String" allowAnonymous="false" /> in web.config.
3. Create a new user for the website. No user album is created. This is the expected behaviour.
4. Log in as the newly created user and check "Enable my user album" and an album is created. This is the expected behaviour.
5. Uncheck the "Enable my user album" and the album is removed. This is the expected behaviour.
6. Check the "Enable my user album" for a second go round. No album is created. Is this the expected behaviour?

Thanks

Richard

Roger Martin
#12 Posted : Tuesday, 9 June 2009 1:00:38 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

I can't repro it. When you click the checkbox and hit save, the user album won't be created until the *next* page load. This is because I am saving the setting in the first step, and letting the normal user album validation create the album on the next page load. Perhaps this is what you are noticing?

One can argue I should do both things upon saving so that the Go to my album button appears at the top right, but that was extra work. :-) Maybe one of these days when I am resting...
Roger Martin
Creator and Lead Developer of Gallery Server Pro
rmcbride@rama.com
#13 Posted : Tuesday, 9 June 2009 1:58:25 AM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi roger

I can reproduce this behaviour consistently. In fact I cannot seem to recreate user albums for two of my test accounts now that I have unchecked and rechecked that checkbox.

As a part of this testing, I have unchecked the box and exited the application and website completely. But when I go back in and recheck that box, it does not create the user album.

Thanks

Richard
Roger Martin
#14 Posted : Tuesday, 9 June 2009 2:08:47 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Can you confirm that after you check the box and save, you navigate to another page *before* checking for the existence of the user album?
Roger Martin
Creator and Lead Developer of Gallery Server Pro
rmcbride@rama.com
#15 Posted : Tuesday, 9 June 2009 3:06:47 AM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

I figured it out. In the GSP.config for version .3440, you have userAlbumParentAlbumId = "0". In my GSP.config, I have userAlbumParentAlbumId="1". In both cases my galleryId="1".

I did an upgrade and overwrote my setting. Once I changed it back things started working again. I suspect the album could not be created because of an ID conflict.

Thanks

Richard
Roger Martin
#16 Posted : Tuesday, 9 June 2009 3:18:09 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Hmm, not sure what is going on there. The gallery ID should never conflict with the album ID, even when they are the same value, because they are different entities. The setting userAlbumParentAlbumId will be "0" whenever user albums are disabled.

Glad you got it. Now it is back to writing the Admin Guide...


Roger Martin
Creator and Lead Developer of Gallery Server Pro
rmcbride@rama.com
#17 Posted : Tuesday, 9 June 2009 3:30:19 AM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

Then that is the problem. The new release ships with Albums disabled (ie userAlbumParentAlbumId = "0"). I did not know enough to set it properly. So when a user wanted an album it could not be created because Albums were disabled. As you say, it's working now so all is well.

Thanks

Richard
Roger Martin
#18 Posted : Tuesday, 9 June 2009 3:41:14 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Maybe I should leave well enough alone, but I can't resist...

First, user albums are enabled/disabled through the setting enableUserAlbum. When this setting is false, GSP puts a "0" in the setting userAlbumParentAlbumId, but it shouldn't matter because that setting should always be ignored when enabledUserAlbum="false".

Second, when you upgraded from 2.3.3421, there were two upgrade techniques:

1. Keep your existing gsp.config and paste in the new settings.
2. Rename your original file to galleryserverpro_old.config and use the upgrade wizard to import the settings.

In either case your original settings should have migrated to the new version. Did you perhaps follow a third, ahem.. undocumented upgrade path?
Roger Martin
Creator and Lead Developer of Gallery Server Pro
rmcbride@rama.com
#19 Posted : Tuesday, 9 June 2009 11:27:13 PM(UTC)
Rank: Advanced Member

Joined: 25/04/2009(UTC)
Posts: 59

Hi Roger

I used an undocumented alternative path for the upgrade. I just copied the files and updated the gsp.config. oops.

Thanks

Richard
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.