hasAccess() 공개 메소드

Restricts access to controller's actions
public hasAccess ( ) : boolean
리턴 boolean Returns true if user has access.
예제 #1
0
 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
0
파일: Azure.php 프로젝트: mheydt/scalr
 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
0
파일: Rds.php 프로젝트: sacredwebsite/scalr
 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
0
 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_GCE_SNAPSHOTS);
 }
예제 #5
0
 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_ADMINISTRATION_SCRIPTS);
 }
예제 #6
0
파일: Sources.php 프로젝트: mheydt/scalr
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_DEPLOYMENTS_SOURCES);
 }
예제 #7
0
파일: Sshkeys.php 프로젝트: mheydt/scalr
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_SECURITY_SSH_KEYS);
 }
예제 #8
0
파일: Monitoring.php 프로젝트: scalr/scalr
 /**
  * {@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
0
파일: Disks.php 프로젝트: scalr/scalr
 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_GCE_PERSISTENT_DISKS);
 }
예제 #10
0
파일: Import.php 프로젝트: scalr/scalr
 /**
  * {@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
0
 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isFarmAllowed(null, Acl::PERM_FARMS_STATISTICS);
 }
예제 #12
0
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_GENERAL_SCHEDULERTASKS);
 }
예제 #13
0
 /**
  * {@inheritdoc}
  * @see \Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_ANALYTICS_PROJECTS_ACCOUNT);
 }
예제 #14
0
 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     //TODO:
     //return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_OPENSTACK_SNAPSHOTS);
     return parent::hasAccess();
 }
예제 #15
0
파일: Variables.php 프로젝트: mheydt/scalr
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_GLOBAL_VARIABLES_ACCOUNT);
 }
예제 #16
0
파일: Backups.php 프로젝트: rickb838/scalr
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_DB_BACKUPS);
 }
예제 #17
0
파일: Import.php 프로젝트: scalr/scalr
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_IMAGES_ENVIRONMENT, Acl::PERM_IMAGES_ENVIRONMENT_IMPORT);
 }
예제 #18
0
파일: Cloudwatch.php 프로젝트: mheydt/scalr
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_AWS_CLOUDWATCH);
 }
예제 #19
0
파일: Farms.php 프로젝트: mheydt/scalr
 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_ANALYTICS_ENVIRONMENT);
 }
예제 #20
0
 public function hasAccess()
 {
     return parent::hasAccess() && $this->user->canManageAcl();
 }
예제 #21
0
파일: Rabbitmq.php 프로젝트: mheydt/scalr
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_SERVICES_RABBITMQ);
 }
예제 #22
0
 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_FARMS_ROLES);
 }
예제 #23
0
파일: Dbmsr.php 프로젝트: mheydt/scalr
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_DB_DATABASE_STATUS);
 }
예제 #24
0
파일: Ips.php 프로젝트: mheydt/scalr
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_CLOUDSTACK_PUBLIC_IPS);
 }
예제 #25
0
파일: Eips.php 프로젝트: mheydt/scalr
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_AWS_ELASTIC_IPS);
 }
예제 #26
0
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(\Scalr\Acl\Acl::RESOURCE_ADMINISTRATION_GLOBAL_VARIABLES);
 }
예제 #27
0
 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_OPENSTACK_VOLUMES);
 }
예제 #28
0
파일: Clouds.php 프로젝트: scalr/scalr
 public function hasAccess()
 {
     return parent::hasAccess() && ($this->user->isAccountSuperAdmin() || $this->request->isAllowed(Acl::RESOURCE_ENV_CLOUDS_ENVIRONMENT));
 }
예제 #29
0
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_ENVADMINISTRATION_GOVERNANCE);
 }
예제 #30
0
파일: Details.php 프로젝트: mheydt/scalr
 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess();
 }