isAccountSuperAdmin() public method

Checks if the user is account admin
public isAccountSuperAdmin ( ) : boolean
return boolean Returns true if user is account super admin
示例#1
0
文件: User.php 项目: rickb838/scalr
 /**
  * Checks whether the user is allowed to edit specified user
  *
  * @param   \Scalr_Account_User  $user The user to edit
  * @return  boolean              Returns true if the user is allowed to edit specified user
  */
 public function canEditUser($user)
 {
     return !$this->isTeamUser() && $user->getAccountId() == $this->getAccountId() && ($this->getId() == $user->getId() || $this->isAccountOwner() || $this->isAccountSuperAdmin() && !$user->isAccountOwner() || $this->isAccountAdmin() && !$user->isAccountOwner() && !$user->isAccountSuperAdmin());
 }