The fix from Artie works great, just wanted to put this fix here as well.

Quote:-----------------------------------
lefty74
Tue 02 Jan, 2007 15:22
Permission In Personal Folders
-----------------------------------
Sorry, me again.
I only just noticed. Whenever I save any settings for personal folders in the ACP it overrides the view permission setting a user has set.
For example,
The personal galleries are set to view for everyone.
User Test has 5 subcategories, 3 of them set so that only registered users can view them.
If I want to change anything in the ACP for the personal galleries, e.g. whether the user can use pictures as avatar or not, and save it, all of the gallery view permissions are saved also again and resetting any different view settings made by users in their personal galleries.
That would mean that the 3 subcategories of User Test are reset for everyone to see and he would need to redo his permission settings.
Has anyone else encountered this problem?
thanks
-----------------------------------
Artie
Tue 02 Jan, 2007 17:10
Re: Permission In Personal Folders
-----------------------------------
Man, you are right. How do you find all this stuff.
I think we should give you the title of BugMaster )
The script needs to check to see if the ACP switch Who can view personal galleries by default has been changed or not.
Looks like a job for the Mighty to me. wink
-----------------------------------
lefty74
Tue 02 Jan, 2007 17:56
Re: Permission In Personal Folders
-----------------------------------
Sorry, that I didn't come across this while this was in RC stage.
I have set the personal galleries viewable to registered users.
However, my gf set some of her categories to viewable all and with the direct link you are able to view the category even if not registered (I thought that was pretty neat acutally).
When I changed something in the ACP, the links wouldnt work anymore, that's how I noticed that the permission were overwritten.
These things are difficult to test and become more apparent with live users![]()
-----------------------------------
Artie
Tue 02 Jan, 2007 21:54
Re: Permission In Personal Folders
-----------------------------------
MG may wish to approach this differently, but until then I made the following changes for my album....which only resets any view permission if the ACP's default setting was actually changed. Also adds a warning to Admin concerning this.
#
#-----[ OPEN ]------------------------------------------------
#
lang_album_admin.php
#
#-----[ FIND ]------------------------------------------------
#
$lang['Personal_gallery_view'] = 'Who can view personal galleries by default';
#
#-----[ REPLACE WITH ]------------------------------------------------
#
$lang['Personal_gallery_view'] = 'Who can view personal galleries by default<br /><span class="gensmall">Changing this setting after galleries have been created will reset any view permission made by User/Moderator for all user galleries.';
#
#-----[ OPEN ]------------------------------------------------
#
admin_album_config_extended.php
#
#-----[ FIND ]------------------------------------------------
#
$config_value = ( isset($_POST[$config_name]) ) ? $_POST[$config_name] $row['config_value'];
#
#-----[ AFTER ADD ]------------------------------------------------
#
if ($config_name == 'personal_gallery_view'){$prior_view_level = $row['config_value'];}
#
#-----[ FIND ]------------------------------------------------
#
if (isset($_POST['personal_gallery_view']))
#
#-----[ REPLACE WITH ]------------------------------------------------
#
if ((isset($_POST['personal_gallery_view'])) && (!$_POST['personal_gallery_view'] == $prior_view_level))