public function init()
 {
     parent::init();
     require_once _base_ . '/lib/lib.json.php';
     $this->db = DbConn::getInstance();
     $this->model = new GroupmanagementAdm();
     $this->json = new Services_JSON();
     $this->permissions = array('view' => checkPerm('view', true, 'groupmanagement'), 'add' => checkPerm('add', true, 'groupmanagement'), 'mod' => checkPerm('mod', true, 'groupmanagement'), 'del' => checkPerm('del', true, 'groupmanagement'), 'associate_user' => checkPerm('associate_user', true, 'groupmanagement'));
 }
 public function init()
 {
     parent::init();
     $this->json = new Services_JSON();
     $this->model = new LangAdm();
     $this->perm = array('view' => checkPerm('view', true, 'lang', 'framework'), 'mod' => checkPerm('mod', true, 'lang', 'framework'));
 }
 public function init()
 {
     parent::init();
     require_once _base_ . '/lib/lib.json.php';
     $this->json = new Services_JSON();
     $this->model = new FunctionalrolesAdm();
     $this->permissions = array('view' => checkPerm('view', true, 'functionalroles'), 'add' => checkPerm('mod', true, 'functionalroles'), 'mod' => checkPerm('mod', true, 'functionalroles'), 'del' => checkPerm('mod', true, 'functionalroles'), 'associate_user' => checkPerm('associate_user', true, 'functionalroles'));
 }
 public function init()
 {
     parent::init();
     require_once _base_ . '/lib/lib.json.php';
     $this->model = new AdminrulesAdm();
     $this->json = new Services_JSON();
     $this->acl_man =& Docebo::user()->getAclManager();
 }
 public function init()
 {
     parent::init();
     require_once _base_ . '/lib/lib.json.php';
     $this->model = new AdminmanagerAdm();
     $this->json = new Services_JSON();
     $this->acl_man =& Docebo::user()->getAclManager();
     $this->permissions = array('view' => checkPerm('view', true, 'adminmanager'), 'assign_profile' => checkPerm('mod', true, 'adminmanager'), 'assign_users' => checkPerm('mod', true, 'adminmanager'), 'assign_courses' => checkPerm('mod', true, 'adminmanager'));
 }
 public function init()
 {
     parent::init();
     require_once _base_ . '/lib/lib.json.php';
     $this->db = DbConn::getInstance();
     $this->model = new PrivacypolicyAdm();
     $this->json = new Services_JSON();
     $this->permissions = array('view' => checkPerm('view', true, 'privacypolicy'), 'add' => checkPerm('mod', true, 'privacypolicy'), 'mod' => checkPerm('mod', true, 'privacypolicy'), 'del' => checkPerm('del', true, 'privacypolicy'));
 }
 public function init()
 {
     parent::init();
     require_once _base_ . '/lib/lib.json.php';
     $this->json = new Services_JSON();
     $this->model = new CompetencesAdm();
     $this->base_link_course = 'alms/course';
     $this->base_link_competence = 'adm/competences';
     $this->permissions = array('view' => checkPerm('view', true, 'competences'), 'add' => checkPerm('mod', true, 'competences'), 'mod' => checkPerm('mod', true, 'competences'), 'del' => checkPerm('mod', true, 'competences'), 'associate_user' => checkPerm('associate_user', true, 'competences'));
 }
 public function init()
 {
     parent::init();
     require_once _base_ . '/lib/lib.json.php';
     $this->json = new Services_JSON();
     $this->model = new DashboardAdm();
     YuiLib::load('autocomplete,tabview');
     Util::get_js(Get::rel_path('adm') . '/views/dashboard/dashboard.js', true, true);
     $this->permissions = array('view' => checkPerm('view', true, 'dashboard', 'framework'), 'view_user' => checkPerm('view', true, 'usermanagement', 'framework'), 'add_user' => checkPerm('add', true, 'usermanagement', 'framework'), 'mod_user' => checkPerm('mod', true, 'usermanagement', 'framework'), 'del_user' => checkPerm('del', true, 'usermanagement', 'framework'), 'view_course' => checkPerm('view', true, 'course', 'lms'), 'add_course' => checkPerm('add', true, 'course', 'lms'), 'mod_course' => checkPerm('mod', true, 'course', 'lms'), 'del_course' => checkPerm('del', true, 'course', 'lms'), 'view_communications' => checkPerm('view', true, 'communication', 'lms'), 'add_communications' => checkPerm('add', true, 'communication', 'lms'), 'view_games' => checkPerm('view', true, 'games', 'lms'), 'add_games' => checkPerm('add', true, 'games', 'lms'), 'subscribe' => checkPerm('subscribe', true, 'course', 'lms'));
 }
 public function init()
 {
     parent::init();
     require_once _base_ . '/lib/lib.json.php';
     $this->model = new UsermanagementAdm();
     $this->json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
     $this->numVarFields = 3;
     $this->sessionPrefix = 'usermanagement';
     $this->permissions = array('view' => checkPerm('view', true, 'usermanagement'), 'view_user' => checkPerm('view', true, 'usermanagement'), 'add_user' => checkPerm('add', true, 'usermanagement'), 'mod_user' => checkPerm('mod', true, 'usermanagement'), 'del_user' => checkPerm('del', true, 'usermanagement'), 'approve_waiting_user' => checkPerm('approve_waiting_user', true, 'usermanagement'), 'view_org' => checkPerm('view', true, 'usermanagement'), 'add_org' => checkPerm('mod_org', true, 'usermanagement'), 'mod_org' => checkPerm('mod_org', true, 'usermanagement'), 'del_org' => checkPerm('mod_org', true, 'usermanagement'), 'associate_user' => checkPerm('associate_user', true, 'usermanagement'));
     // Check if the user admin has reached the max number of users he can create
     if (Docebo::user()->getUserLevelId() != ADMIN_GROUP_GODADMIN) {
         $admin_pref = new AdminPreference();
         $pref = $admin_pref->getAdminRules(Docebo::user()->getIdSt());
         if ($pref['admin_rules.limit_user_insert'] == 'on') {
             $user_pref = new UserPreferences(Docebo::user()->getIdSt());
             if ($user_pref->getPreference('user_created_count') >= $pref['admin_rules.max_user_insert']) {
                 $this->permissions['add_user'] = false;
                 $this->reached_max_user_created = true;
             }
         }
     }
 }