mirror of
https://github.com/tiennm99/coolify.git
synced 2026-09-20 04:23:16 +00:00
Add role-based authorization for updating teams
This commit is contained in:
1 parent
c223408c3c
commit
36c31dcd67
2 files changed
+9
-3
No files matched your search
+5
-3
@@ -21,9 +21,11 @@ class Team extends Model implements SendsDiscord, SendsEmail
|
||||
|
||||
protected static function booted()
|
||||
{
|
||||
// static::saved(function () {
|
||||
// refreshSession();
|
||||
// });
|
||||
static::saving(function ($team) {
|
||||
if (auth()->user()->isMember()) {
|
||||
throw new \Exception('You are not allowed to update this team.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function routeNotificationForDiscord()
|
||||
|
||||
Reference in new issue
Block a user