mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
3.2.4
This commit is contained in:
14
app/User.php
14
app/User.php
@@ -32,6 +32,11 @@ class User extends Authenticatable
|
||||
return $this->belongsTo('App\Rank');
|
||||
}
|
||||
|
||||
public function job()
|
||||
{
|
||||
return $this->belongsTo('App\Job');
|
||||
}
|
||||
|
||||
public function logs()
|
||||
{
|
||||
return $this->hasMany(Log::class);
|
||||
@@ -287,7 +292,14 @@ class User extends Authenticatable
|
||||
|
||||
public function permission($perm)
|
||||
{
|
||||
return $this->rank->permission($perm);
|
||||
if ($this->job->permission($perm) == 0)
|
||||
{
|
||||
return $this->rank->permission($perm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->job->permission($perm);
|
||||
}
|
||||
}
|
||||
|
||||
public function p($perm)
|
||||
|
||||
Reference in New Issue
Block a user