mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-20 03:08:11 +00:00
Can't remove your own admin rights.
This commit is contained in:
@@ -189,7 +189,7 @@ class UserController extends Controller
|
|||||||
$this->repository->attachRole($user, 'owner');
|
$this->repository->attachRole($user, 'owner');
|
||||||
session()->flash('info', trans('firefly.give_admin_careful'));
|
session()->flash('info', trans('firefly.give_admin_careful'));
|
||||||
}
|
}
|
||||||
if (false === $data['is_owner']) {
|
if (false === $data['is_owner'] && $user->id !== auth()->user()->id) {
|
||||||
$this->repository->removeRole($user, 'owner');
|
$this->repository->removeRole($user, 'owner');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user