mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 17:26:43 +00:00
Update AccountController, prevent blocking admins
This commit is contained in:
parent
4762efe8ee
commit
2c440b4882
1 changed files with 1 additions and 1 deletions
|
@ -244,7 +244,7 @@ class AccountController extends Controller
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'user':
|
case 'user':
|
||||||
$profile = Profile::findOrFail($item);
|
$profile = Profile::findOrFail($item);
|
||||||
if ($profile->id == $user->id) {
|
if ($profile->id == $user->id || $profile->user->is_admin == true) {
|
||||||
return abort(403);
|
return abort(403);
|
||||||
}
|
}
|
||||||
$class = get_class($profile);
|
$class = get_class($profile);
|
||||||
|
|
Loading…
Reference in a new issue