1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-25 01:05:36 +00:00

Update AccountController, prevent blocking admins

This commit is contained in:
Daniel Supernault 2020-07-12 21:12:39 -06:00
parent 4762efe8ee
commit 2c440b4882
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -244,7 +244,7 @@ class AccountController extends Controller
switch ($type) {
case 'user':
$profile = Profile::findOrFail($item);
if ($profile->id == $user->id) {
if ($profile->id == $user->id || $profile->user->is_admin == true) {
return abort(403);
}
$class = get_class($profile);