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