/** * Checks for any role * * @param array $roleNames * @return boolean */ public function hasAnyRole(array $roleNames) { if (!$this->loggedIn) { return false; } return $this->user->hasAnyRole($roleNames); }
public function canDelete(User $user) { return $user !== null && $user->hasAnyRole(array("example_admin")); }
public function canDelete(User $user) { return $user !== null && $user->hasAnyRole(array("sprint_user")); }