mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-23 23:13:18 -06:00
Can't remove your own admin rights.
This commit is contained in:
parent
87b62e2e72
commit
db3c9fbd28
@ -189,7 +189,7 @@ class UserController extends Controller
|
||||
$this->repository->attachRole($user, 'owner');
|
||||
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');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user