• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Owner can't see their own albums when those albums are shared with specific members

imthebest

Formerly Super120
#1
This is very similar to this one and it surprises me that Chris didn't catched this when fixing it.

For example I have just created 7 albums:

demo1.png

However I can only see 4 of them:

demo2.png

The problem is that the other 3 were set to be shared with specific members only.

Thanks,
Super120
 

imthebest

Formerly Super120
#2
Chris, I guess that just like in the other bug the fix for this one isn't going to be retroactive and I'll need to run the following query:

SELECT album.album_id FROM xengallery_album AS album
INNER JOIN xengallery_album_permission AS perm ON
(album.album_id = perm.album_id)
WHERE perm.permission = 'view'
AND perm.access_type = 'shared'
AND NOT EXISTS
(
SELECT shared_user_id
FROM xengallery_shared_map AS shared
WHERE shared.shared_user_id = album.album_user_id
AND shared.album_id = album.album_id
);
In order to find the affected albums and manually set their view privacy level back to "Owner Only", right?
 

Chris D

XenForo developer
Staff member
#3
Although similar in effect, this is slightly different from the other bug relating to "followed" albums.

This actually only applied to newly created albums, e.g. if you specify "shared" access while creating the album, that album would not be visible to the owner.

This is now fixed - and it is fixed retroactively. During the upgrade to XFMG 1.0.5, we will rebuild all "shared" and "followed" access albums to ensure that the album owner themselves can view the albums, if they can't already.
 

imthebest

Formerly Super120
#4
So in other words, for this bug, in XFMG 1.0.3 (the version where it got fixed) you told me:

It has been properly fixed, but the fix isn't retroactive. If the permissions broke before the upgrade then the permissions would need to be reapplied before being able to view the album again.

This would involve a user who can bypass the media privacy to go to the album and change the permissions for them.

Code:
SELECT album.album_id FROM xengallery_album AS album
INNER JOIN xengallery_album_permission AS perm ON
    (album.album_id = perm.album_id)
WHERE perm.permission = 'view'
    AND perm.access_type = 'followed'
    AND NOT EXISTS
    (
        SELECT shared_user_id
        FROM xengallery_shared_map AS shared
        WHERE shared.shared_user_id = album.album_user_id
        AND shared.album_id = album.album_id
    )
So let's say that you have now realized that it wasn't a good idea to not retroactively fix the problem during the upgrade process and now are actually fixing both bugs during the upgrade to 1.0.5? In other words, if I didn't ran the query you provided for the other bug nor manually changed the permissions for those affected albums, the upgrade to 1.0.5 should fix that issue too?