Add role-based authorization for updating teams

This commit is contained in:
Andras Bacsai committed 2024-04-05 16:48:06 +02:00
1 parent c223408c3c
commit 36c31dcd67
2 files changed
+9 -3

No files matched your search

+4
View File
@@ -127,6 +127,10 @@ class User extends Authenticatable implements SendsEmail
{
return $this->role() === 'owner';
}
public function isMember()
{
return $this->role() === 'member';
}
public function isAdminFromSession()
{
if (auth()->user()->id === 0) {