Пример #1
0
 public function initDefaultRoles()
 {
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $role = ilObjRole::createDefaultRole('il_xvit_admin_' . $this->getRefId(), "Admin of vitero obj_no." . $this->getId(), 'il_xvit_admin', $this->getRefId());
     $role = ilObjRole::createDefaultRole('il_xvit_member_' . $this->getRefId(), "Member of vitero obj_no." . $this->getId(), 'il_xvit_member', $this->getRefId());
     parent::initDefaultRoles();
 }
Пример #2
0
 function initDefaultRoles()
 {
     global $rbacadmin, $rbacreview, $ilDB;
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $role = ilObjRole::createDefaultRole('il_crs_admin_' . $this->getRefId(), "Admin of crs obj_no." . $this->getId(), 'il_crs_admin', $this->getRefId());
     $role = ilObjRole::createDefaultRole('il_crs_tutor_' . $this->getRefId(), "Tutor of crs obj_no." . $this->getId(), 'il_crs_tutor', $this->getRefId());
     $role = ilObjRole::createDefaultRole('il_crs_member_' . $this->getRefId(), "Member of crs obj_no." . $this->getId(), 'il_crs_member', $this->getRefId());
     // Break inheritance, create local roles and initialize permission
     // settings depending on course status.
     $this->__setCourseStatus();
     return array();
 }
 public function initDefaultRoles()
 {
     /**
      * @var $rbacadmin  ilRbacAdmin
      * @var $rbacreview ilRbacReview
      */
     global $rbacadmin, $rbacreview;
     include_once 'class.ilObjAdobeConnectAccess.php';
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     ilObjAdobeConnectAccess::getLocalAdminRoleTemplateId();
     ilObjAdobeConnectAccess::getLocalMemberRoleTemplateId();
     $admin_role = ilObjRole::createDefaultRole('il_xavc_admin_' . $this->getRefId(), 'Admin of Adobe Connect object with obj_no.' . $this->getId(), 'il_xavc_admin', $this->getRefId());
     $member_role = ilObjRole::createDefaultRole('il_xavc_member_' . $this->getRefId(), 'Member of Adobe Connect object with obj_no.' . $this->getId(), 'il_xavc_member', $this->getRefId());
     $ops = $rbacreview->getOperationsOfRole($member_role->getId(), 'xavc', $this->getRefId());
     // Set view permission for users
     $rbacadmin->grantPermission(self::RBAC_DEFAULT_ROLE_ID, $ops, $this->getRefId());
     // Set view permission for guests
     $rbacadmin->grantPermission(self::RBAC_GUEST_ROLE_ID, array(2), $this->getRefId());
     $roles = array($admin_role->getId(), $member_role->getId());
     return $roles ? $roles : array();
 }
Пример #4
0
 public function initDefaultRoles()
 {
     global $rbacadmin, $rbacreview, $ilAppEventHandler;
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $role = new ilObjRole();
     $role->setTitle("il_orgu_employee_" . $this->getRefId());
     $role->setDescription("Emplyee of org unit obj_no." . $this->getId());
     $role->create();
     $GLOBALS['rbacadmin']->assignRoleToFolder($role->getId(), $this->getRefId(), 'y');
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $role_sup = ilObjRole::createDefaultRole('il_orgu_superior_' . $this->getRefId(), "Superior of org unit obj_no." . $this->getId(), 'il_orgu_superior', $this->getRefId());
     $ilAppEventHandler->raise('Modules/OrgUnit', 'initDefaultRoles', array('object' => $this, 'obj_id' => $this->getId(), 'ref_id' => $this->getRefId(), 'role_superior_id' => $role->getId(), 'role_employee_id' => $role_sup->getId()));
 }
Пример #5
0
 /**
  *
  * @global type $rbacadmin
  * @global type $rbacreview
  * @global ilDB $ilDB
  * @return type 
  */
 function initDefaultRoles()
 {
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $role = ilObjRole::createDefaultRole('il_chat_moderator_' . $this->getRefId(), "Moderator of chat obj_no." . $this->getId(), 'il_chat_moderator', $this->getRefId());
     return array();
 }
Пример #6
0
 /**
  * init default roles settings
  * @access	public
  * @return	array	object IDs of created local roles.
  */
 function initDefaultRoles()
 {
     include_once './Services/AccessControl/classes/class.ilObjRole.php';
     $role = ilObjRole::createDefaultRole('il_grp_admin_' . $this->getRefId(), "Groupadmin group obj_no." . $this->getId(), 'il_grp_admin', $this->getRefId());
     $this->m_roleAdminId = $role->getId();
     $role = ilObjRole::createDefaultRole('il_grp_member_' . $this->getRefId(), "Groupmember of group obj_no." . $this->getId(), 'il_grp_member', $this->getRefId());
     $this->m_roleMemberId = $role->getId();
     return array();
 }