AclExtras::aco_sync PHP Méthode

aco_sync() public méthode

Sync the ACO table
public aco_sync ( $params = [] ) : void
Résultat void
    public function aco_sync($params = array())
    {
        $this->_clean = true;
        $this->aco_update($params);
    }

Usage Example

 public function sync()
 {
     $this->layout = 'ajax';
     Configure::write('debug', 0);
     App::uses('AclExtras', 'AclManagement.Lib');
     $acl = new AclExtras();
     $acl->aco_sync();
     $permissions = ClassRegistry::init('Permission');
     $checkAdminPerm = $permissions->find('count', array('conditions' => array('aro_id' => 1, 'aco_id' => 1)));
     if ($checkAdminPerm <= 0) {
         //Allow admins to everything
         $this->loadModel('Group');
         $group = $this->Group;
         $group->id = 1;
         $this->Acl->allow($group, 'controllers');
     }
     $this->set('results', $this->__acosList());
 }
All Usage Examples Of AclExtras::aco_sync