/**
  * Load authorization settings
  * @param sfWebRequest $request
  * @return <type>
  */
 public function executeLoadAuthorization(sfWebRequest $request) {
     $sysObj = new SystemSetting();
     $authorization = AuthorizationConfigurationTable::instance()->getAuthorizationConfiguration()->toArray();
     $worklfosettings = $sysObj->buildAuthorizationColumns($authorization, $this->getContext());
     $this->renderText('{"result":'.json_encode($worklfosettings).'}');
     return sfView::NONE;
 }
 /**
  * Load auth for editing template
  *
  * @param sfWebRequest $request
  * @return <type>
  */
 public function executeLoadDefaultAuthorization(sfWebRequest $request) {
     $sysObj = new SystemSetting();
     $auth = new MergeAuthorization();
     $authorization = AuthorizationConfigurationTable::instance()->getAuthorizationConfiguration(false)->toArray();
     $defaultRole = AuthorizationConfigurationTable::instance()->getAllRoles()->toArray();
     $worklfosettings = $sysObj->buildAuthorizationColumns($authorization, $this->getContext());
     $allRoles = RoleTable::instance()->getAllRole()->toArray();
     $mergedRoles = $auth->mergeRoles($allRoles, $defaultRole, $worklfosettings);
     $this->renderText('{"result":'.json_encode($mergedRoles).'}');
     return sfView::NONE;
 }