virtualhost hostc create
This commit is contained in:
parent
6bae547730
commit
ef7d996bf4
15
image.php
15
image.php
|
@ -78,13 +78,24 @@ class image extends objectStructs
|
|||
|
||||
public function hasRole( string $Role)
|
||||
{
|
||||
$this->Log(__FUNCTION__ . "Checking Role: $Role");
|
||||
$this->Log(__FUNCTION__ . " Checking Role: $Role");
|
||||
if (isset($this->annotations->roles[$Role]) OR isset($this->annotations->roles[ucfirst($Role) ] ) )
|
||||
{
|
||||
$this->Log(__FUNCTION__ . "--Image has role: $Role");
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
{
|
||||
foreach($this->annotations->roles as $RoleRow)
|
||||
{
|
||||
if ($RoleRow === $Role)
|
||||
{
|
||||
$this->Log(__FUNCTION__ . "--Image has role (found as role value and not key): $Role");
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->Log(__FUNCTION__ . "--Image does not seem to have role as key or as value within ->roles array ");
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue