mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-16 14:13:22 +00:00
fix: registration
fix: user deletion
This commit is contained in:
1 parent
949407368e
commit
9f2fbc661a
3 files changed
+3
-3
No files matched your search
@@ -12,7 +12,6 @@ class Delete extends Component
|
||||
$currentTeam = currentTeam();
|
||||
$currentTeam->delete();
|
||||
|
||||
$team = auth()->user()->teams()->first();
|
||||
$currentTeam->members->each(function ($user) use ($currentTeam) {
|
||||
if ($user->id === auth()->user()->id) {
|
||||
return;
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ class User extends Authenticatable implements SendsEmail
|
||||
if ($is_part_of_root_team && $is_admin_of_root_team) {
|
||||
return true;
|
||||
}
|
||||
$role = $teams->where('id', auth()->user()->id)->first()->pivot->role;
|
||||
$role = $teams->where('id', session('currentTeam')->id)->first()->pivot->role;
|
||||
return $role === 'admin' || $role === 'owner';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user