roles
This commit is contained in:
parent
e02d2b2afd
commit
3f4e26c746
10
image.php
10
image.php
|
@ -62,4 +62,14 @@ class image extends objectStructs
|
|||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public function hasRole( string $Role)
|
||||
{
|
||||
if (isset($this->annotations->roles[$Role]) )
|
||||
return true;
|
||||
elseif ( isset($this->annotations->roles[ucfirst($Role) ] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -24,4 +24,14 @@ class imageAnnotations extends objectStructs
|
|||
$this->roles = explode(',',$this->roles);
|
||||
}
|
||||
}
|
||||
|
||||
public function hasRole( string $Role)
|
||||
{
|
||||
if (isset($this->roles[$Role]) )
|
||||
return true;
|
||||
elseif ( isset($this->roles[ucfirst($Role) ] ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue