mirror of
https://github.com/ershisan99/coolify.git
synced 2026-01-05 05:02:06 +00:00
roles
This commit is contained in:
@@ -8,10 +8,19 @@ use Livewire\Component;
|
||||
class Member extends Component
|
||||
{
|
||||
public User $member;
|
||||
public function makeAdmin()
|
||||
{
|
||||
$this->member->teams()->updateExistingPivot(session('currentTeam')->id, ['role' => 'admin']);
|
||||
$this->emit('reloadWindow');
|
||||
}
|
||||
public function makeReadonly()
|
||||
{
|
||||
$this->member->teams()->updateExistingPivot(session('currentTeam')->id, ['role' => 'readonly']);
|
||||
$this->emit('reloadWindow');
|
||||
}
|
||||
public function remove()
|
||||
{
|
||||
$this->member->teams()->detach(session('currentTeam'));
|
||||
session(['currentTeam' => session('currentTeam')->fresh()]);
|
||||
$this->emit('reloadWindow');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user