Пример #1
0
 /**
  * Process
  *
  * @return	boolean	false if the process is aborted
  * @access	public
  */
 function process()
 {
     if (!$this->_application->canViewPage()) {
         org_glizy_Session::set('glizy.loginUrl', org_glizy_helpers_Link::scriptUrl());
         org_glizy_helpers_Navigation::gotoUrl(org_glizy_helpers_Link::makeUrl('accessDenied'));
     }
     $this->processChilds();
 }
Пример #2
0
 protected function loadContentFromDB()
 {
     if (!$this->_application->canViewPage()) {
         //$this->setAttribute('templateFileName', 'accessDenaied' );
         org_glizy_Session::set('glizy.loginUrl', org_glizy_helpers_Link::scriptUrl());
         org_glizy_helpers_Navigation::gotoUrl(org_glizy_helpers_Link::makeUrl('accessDenied'));
     }
     // if ($this->_user->backEndAccess && org_glizy_Request::get( 'draft', '' ) == '1')
     // {
     // 	$versionStatus = 'DRAFT';
     // }
     // TODO gestire lo stato PUBLISHED E DRAFT
     $contentProxy = org_glizy_ObjectFactory::createObject('org.glizycms.contents.models.proxy.ContentProxy');
     $this->_content = $contentProxy->readContentFromMenu($this->_application->getPageId(), org_glizy_ObjectValues::get('org.glizy', 'languageId'));
 }
Пример #3
0
 function process()
 {
     $allowGroups = $this->getAttribute('allowGroups') != '' ? explode(',', $this->getAttribute('allowGroups')) : array();
     if ((!org_glizy_Session::get('glizy.userLogged') || !(count($allowGroups) ? in_array($this->_user->groupId, $allowGroups) : true)) && $this->getAttribute('enabled')) {
         if (org_glizy_helpers_Link::scriptUrl() != org_glizy_helpers_Link::makeUrl('link', array('pageId' => org_glizy_Config::get('START_PAGE')))) {
             if ($this->getAttribute('showErrorMessage')) {
                 org_glizy_Session::set('glizy.loginError', org_glizy_locale_Locale::get('GLZ_LOGIN_NOACCESS'));
             }
             org_glizy_Session::set('glizy.loginUrl', __Request::get('__url__'));
         }
         org_glizy_helpers_Navigation::gotoUrl(org_glizy_helpers_Link::makeUrl('link', array('pageId' => $this->getAttribute('accessPageId'))));
         exit;
     }
     if ($this->getAttribute('checkAcl') && !$this->_user->acl($this->_application->getPageId(), 'visible')) {
         header('HTTP/1.0 403 Forbidden');
         exit;
     }
 }