本文整理匯總了PHP中Scalr_UI_Controller::hasAccess方法的典型用法代碼示例。如果您正苦於以下問題:PHP Scalr_UI_Controller::hasAccess方法的具體用法?PHP Scalr_UI_Controller::hasAccess怎麽用?PHP Scalr_UI_Controller::hasAccess使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Scalr_UI_Controller
的用法示例。
在下文中一共展示了Scalr_UI_Controller::hasAccess方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: hasAccess
public function hasAccess()
{
if (parent::hasAccess()) {
return $this->user->getType() == Scalr_Account_User::TYPE_ACCOUNT_OWNER || $this->user->isTeamOwner() ? true : false;
} else {
return false;
}
}
示例2: hasAccess
public function hasAccess()
{
$enabledPlatforms = $this->getEnvironment()->getEnabledPlatforms();
if (!in_array(SERVER_PLATFORMS::AZURE, $enabledPlatforms)) {
throw new Exception('You need to enable Azure platform for current environment');
}
return parent::hasAccess();
}
示例3: hasAccess
public function hasAccess()
{
if (!parent::hasAccess() || !$this->request->isAllowed(Acl::RESOURCE_AWS_RDS)) {
return false;
}
if (!in_array(SERVER_PLATFORMS::EC2, $this->getEnvironment()->getEnabledPlatforms())) {
throw new Exception("You need to enable RDS platform for current environment");
}
return true;
}
示例4: hasAccess
/**
* {@inheritdoc}
* @see Scalr_UI_Controller::hasAccess()
*/
public function hasAccess()
{
return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_GCE_SNAPSHOTS);
}
示例5: hasAccess
/**
* {@inheritdoc}
* @see Scalr_UI_Controller::hasAccess()
*/
public function hasAccess()
{
return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_ADMINISTRATION_SCRIPTS);
}
示例6: hasAccess
public function hasAccess()
{
return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_DEPLOYMENTS_SOURCES);
}
示例7: hasAccess
public function hasAccess()
{
return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_SECURITY_SSH_KEYS);
}
示例8: hasAccess
/**
* {@inheritdoc}
* @see Scalr_UI_Controller::hasAccess()
*/
public function hasAccess()
{
return parent::hasAccess() && $this->request->isAllowed([Acl::RESOURCE_FARMS, Acl::RESOURCE_TEAM_FARMS, Acl::RESOURCE_OWN_FARMS], Acl::PERM_FARMS_STATISTICS);
}
示例9: hasAccess
/**
* {@inheritdoc}
* @see Scalr_UI_Controller::hasAccess()
*/
public function hasAccess()
{
return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_GCE_PERSISTENT_DISKS);
}
示例10: hasAccess
/**
* {@inheritdoc}
* @see Scalr_UI_Controller::hasAccess()
*/
public function hasAccess()
{
return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_DISCOVERY_SERVERS) && $this->request->isAllowed(Acl::RESOURCE_DISCOVERY_SERVERS, Acl::PERM_DISCOVERY_SERVERS_IMPORT);
}
示例11: hasAccess
/**
* {@inheritdoc}
* @see Scalr_UI_Controller::hasAccess()
*/
public function hasAccess()
{
return parent::hasAccess() && $this->request->isFarmAllowed(null, Acl::PERM_FARMS_STATISTICS);
}
示例12: hasAccess
public function hasAccess()
{
return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_GENERAL_SCHEDULERTASKS);
}
示例13: hasAccess
/**
* {@inheritdoc}
* @see \Scalr_UI_Controller::hasAccess()
*/
public function hasAccess()
{
return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_ANALYTICS_PROJECTS_ACCOUNT);
}
示例14: hasAccess
/**
* {@inheritdoc}
* @see Scalr_UI_Controller::hasAccess()
*/
public function hasAccess()
{
//TODO:
//return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_OPENSTACK_SNAPSHOTS);
return parent::hasAccess();
}
示例15: hasAccess
public function hasAccess()
{
return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_GLOBAL_VARIABLES_ACCOUNT);
}