updates
This commit is contained in:
@@ -35,6 +35,11 @@ class User extends Authenticatable
|
||||
});
|
||||
}
|
||||
public function isAdmin()
|
||||
{
|
||||
ray(session('currentTeam'));
|
||||
return session('currentTeam');
|
||||
}
|
||||
public function isInstanceAdmin()
|
||||
{
|
||||
$found_root_team = auth()->user()->teams->filter(function ($team) {
|
||||
if ($team->id == 0) {
|
||||
@@ -49,10 +54,10 @@ class User extends Authenticatable
|
||||
return $this->belongsToMany(Team::class);
|
||||
}
|
||||
|
||||
public function currentTeam()
|
||||
{
|
||||
return $this->belongsTo(Team::class);
|
||||
}
|
||||
// public function currentTeam()
|
||||
// {
|
||||
// return $this->belongsTo(Team::class);
|
||||
// }
|
||||
|
||||
public function otherTeams()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user