PHP Class Scalr_Permissions

Afficher le fichier Open project: scalr/scalr

Protected Properties

Свойство Type Description
$envId
$user

Méthodes publiques

Méthode Description
__construct ( Scalr_Account_User $user )
check ( $object )
hasAccessEnvironment ( integer $envId ) : boolean Checks whether specified environment corresponds the user's environment.
hasAccessFarm ( DBFarm $dbFarm, string $perm = null ) : boolean Checks whether current dbFarm object can be accessed by user
hasAccessServer ( DBServer $dbServer ) : boolean Checks whether specified server can be accessed by the user
hasReadOnlyAccessServer ( DBServer $dbServer ) : boolean Checks whether user read only access to specified server
setEnvironmentId ( integer $envId ) : Scalr_Permissions Sets Environment Id
validate ( $object )

Method Details

__construct() public méthode

public __construct ( Scalr_Account_User $user )
$user Scalr_Account_User

check() public méthode

public check ( $object )

hasAccessEnvironment() public méthode

Checks whether specified environment corresponds the user's environment.
public hasAccessEnvironment ( integer $envId ) : boolean
$envId integer The ID of the environment
Résultat boolean Returns true if user's environment equals to specified environment

hasAccessFarm() public méthode

Checks whether current dbFarm object can be accessed by user
public hasAccessFarm ( DBFarm $dbFarm, string $perm = null ) : boolean
$dbFarm DBFarm DbFarm object
$perm string
Résultat boolean Returns true if access is granted

hasAccessServer() public méthode

Checks whether specified server can be accessed by the user
public hasAccessServer ( DBServer $dbServer ) : boolean
$dbServer DBServer The DBServer object
Résultat boolean Returns true if specified server can be accessed by the user

hasReadOnlyAccessServer() public méthode

Checks whether user read only access to specified server
public hasReadOnlyAccessServer ( DBServer $dbServer ) : boolean
$dbServer DBServer The DBServer object
Résultat boolean Returns true if specified server can be accessed by the user

setEnvironmentId() public méthode

Sets Environment Id
public setEnvironmentId ( integer $envId ) : Scalr_Permissions
$envId integer
Résultat Scalr_Permissions

validate() public méthode

public validate ( $object )

Property Details

$envId protected_oe property

protected $envId

$user protected_oe property

protected $user