Reverted an erroneous change that shouldn't have happened from git committing on the server

This commit is contained in:
Andy Heathershaw 2017-09-16 08:32:23 +01:00
parent 0b64728d0a
commit 4f7ad41009

View File

@ -43,7 +43,7 @@ class DbHelper
return $query->paginate(UserConfig::get('items_per_page'));
}
public static function getAlbumsForCurrentUser_NonPaged()
public static function getAlbumsForCurrentUser_NonPaged($permission = 'list')
{
$albumsQuery = Album::query();
$user = Auth::user();
@ -60,7 +60,7 @@ class DbHelper
->join('permissions', 'permissions.id', '=', 'album_anonymous_permissions.permission_id')
->where([
['permissions.section', 'album'],
['permissions.description', 'list']
['permissions.description', $permission]
]);
}
else
@ -78,12 +78,12 @@ class DbHelper
->where('albums.user_id', $user->id)
->orWhere([
['group_permissions.section', 'album'],
['group_permissions.description', 'list'],
['group_permissions.description', $permission],
['user_groups.user_id', $user->id]
])
->orWhere([
['user_permissions.section', 'album'],
['user_permissions.description', 'list'],
['user_permissions.description', $permission],
['album_user_permissions.user_id', $user->id]
]);
}