This commit is contained in:
sbyrd 2020-12-04 21:13:35 -05:00
parent e02d2b2afd
commit 3f4e26c746
2 changed files with 20 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}