I have seen that currently all albums are visible and editable by all
That should not be the case when Owners only is checked ( Table VII-C1 ).
It is not very clear to me what you mean exactly. I noticed that currently everybody can edit a public album, that is not good, one should have wppa_admin rights to do so. This will be corrected in the next version.
our need is that each user can see and edit only his own albums as well as public ones. While the users should not be enabled to see the albums of the other users. The public albums are collections of pictures of several people, that’s why everyone of them should be enabled to edit titles and tags in there. Finally, the most important would be that everybody is enabled to create new own albums, Currently that’s not possible, if Tab VII-A (album admin) is disabled; if Tab VII-A (album admin) ist activated, every user can see all the albums. That’s not good!
the most important would be that everybody is enabled to create new own albums
In Table IX-D12 you can specify the max number of albums a user can create. ( 0 = none, not unlimited ! ). In Table VII-B1 you enable the feature.
Users can edit their own photos, also in public albums. See the edit link in the photo description box in the slideshow.
It must be enabled in Table VII-D2
All the settings that you told me in your last post are already activated. But they are usable only if the corresponding (Album Admin) is activated on Tab VII-A n(as I wrote you in my last posts). But the consequences are that even the albums of the other users are shown. . . So the problem is there again. My wishes would be that:
a) when Tab VII-A is activated, it should NOT be possible to see the albums of other users
or that:
b) if the control Tab VII-A is disactivated, it shall be possible to add new albums.
Both solutions would be fine, so it doesn’t matter which one you can realize.
Now i see. Yes, i indeed created recently this problem what should be corrected asap. It will be fixed in the release version of 5.3.9.
If you want to patch it right now, edit wppa-common-functions.php, around line 610:
It reads:
.
// See for given album data array or album number
else {
// Album Administrator has always access
if ( current_user_can('wppa_admin') ) return true;
// If all albums are public
if ( ! wppa_switch('wppa_owner_only') ) return true;
Change to:
.
// See for given album data array or album number
else {
// Administrator has always access
if ( current_user_can('administrator') ) return true;
// If all albums are public
if ( ! wppa_switch('wppa_owner_only') ) return true;
i.e. change current_user_can('wppa_admin') into current_user_can('administrator'). This will fix it.
Thanx for the report.
thank you for all, it is now as before. Remainder pending the personalization of public albums….if possible. Thank you
Sure… Same kind of bug:
Edit wppa-album-admin-autosave.php
around line 1034:
.
<?php $np = $counts['selfphotos'];
// $np = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM ".WPPA_PHOTOS." WHERE album=%s", $album['id'])); ?>
<?php $nm = $counts['pendphotos'];
// $nm = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM ".WPPA_PHOTOS." WHERE album=%s AND status=%s", $album['id'], 'pending')); ?>
<td><?php echo $na.'/'.$np; if ($nm) echo '/<span style="font-weight:bold; color:red">'.$nm.'</span>'; ?></td>
<?php if ( $album['owner'] != '--- public ---' || current_user_can('administrator') ) { ?>
<?php $url = wppa_ea_url($album['id']) ?>
<td><a href="<?php echo($url) ?>" class="wppaedit"><?php _e('Edit', 'wppa'); ?></a></td>
<td><a href="<?php echo($url.'&quick') ?>" class="wppaedit"><?php _e('Quick', 'wppa'); ?></a></td>
<td><a href="<?php echo($url.'&bulk') ?>" class="wppaedit"><?php _e('Bulk', 'wppa'); ?></a></td>
<td><a href="<?php echo($url.'&seq') ?>" class="wppaedit"><?php _e('Seq', 'wppa'); ?></a></td>
change:
<?php if ( $album[‘owner’] != ‘— public —‘ || current_user_can(‘administrator‘) ) { ?>
into:
<?php if ( $album[‘owner’] != ‘— public —‘ || current_user_can(‘wppa_admin‘) ) { ?>
the last change displays (in the pubblic album) the link to enter the changes (Edit, Quick, Bulk, etc …) but if you click with the mouse make always “You do not have the rights to edit this album”, and can not be used. Did I do something wrong?
Yes, i just discovered this, almost at the same time as you did.
There is another place where ‘administrator’ should be ‘wppa_admin’:
wppa-album-edit-autosave.php around line 105 should read:
$album_owner = $wpdb->get_var($wpdb->prepare("SELECT <code>owner</code> FROM ".WPPA_ALBUMS." WHERE <code>id</code> = %s", $edit_id));
if ( ( $album_owner == '--- public ---' && ! current_user_can('wppa_admin') ) || ! wppa_have_access($edit_id) ) {
wp_die('You do not have the rights to edit this album');
}
You can also wait until later this day i will release 5.3.9 where it is all fixed. I am working down the checklist at this very moment.