ILIAS
Release_5_0_x_branch Revision 61816
|
Public Member Functions | |
ilObjRole ($a_id=0, $a_call_by_reference=false) | |
Constructor public. | |
validate () | |
Validate role data. | |
getPresentationTitle () | |
return translated title for autogenerated roles | |
toggleAssignUsersStatus ($a_assign_users) | |
getAssignUsersStatus () | |
_getAssignUsersStatus ($a_role_id) | |
read () | |
loads "role" from database private | |
assignData ($a_data) | |
loads a record "role" from array public | |
update () | |
updates a record "role" and write it into database public | |
create () | |
create | |
setAllowRegister ($a_allow_register) | |
set allow_register of role | |
getAllowRegister () | |
get allow_register | |
setDiskQuota ($a_disk_quota) | |
Sets the minimal disk quota imposed by this role. | |
getDiskQuota () | |
Gets the minimal disk quota imposed by this role. | |
setPersonalWorkspaceDiskQuota ($a_disk_quota) | |
Sets the minimal personal workspace disk quota imposed by this role. | |
getPersonalWorkspaceDiskQuota () | |
Gets the minimal personal workspace disk quota imposed by this role. | |
_lookupRegisterAllowed () | |
get all roles that are activated in user registration | |
_lookupAllowRegister ($a_role_id) | |
check whether role is allowed in user registration or not | |
setParent ($a_parent_ref) | |
set reference id of parent object this is neccessary for non RBAC protected objects!!! | |
getParent () | |
get reference id of parent object | |
delete () | |
delete role and all related data | |
getCountMembers () | |
_getTranslation ($a_role_title) | |
_updateAuthMode ($a_roles) | |
_getAuthMode ($a_role_id) | |
__getPermissionDefinitions () | |
changeExistingObjects ($a_start_node, $a_mode, $a_filter, $a_exclusion_filter=array()) | |
Change existing objects. | |
Public Member Functions inherited from ilObject | |
ilObject ($a_id=0, $a_reference=true) | |
Constructor public. | |
withReferences () | |
determines wehter objects are referenced or not (got ref ids or not) | |
read ($a_force_db=false) | |
read object data from db into object | |
getId () | |
get object id public | |
setId ($a_id) | |
set object id public | |
setRefId ($a_id) | |
set reference id public | |
getRefId () | |
get reference id public | |
getType () | |
get object type public | |
setType ($a_type) | |
set object type public | |
getTitle () | |
get object title public | |
getUntranslatedTitle () | |
get untranslated object title public | |
setTitle ($a_title) | |
set object title | |
getDescription () | |
get object description | |
setDescription ($a_desc) | |
set object description | |
getLongDescription () | |
get object long description (stored in object_description) | |
getImportId () | |
get import id | |
setImportId ($a_import_id) | |
set import id | |
getOwner () | |
get object owner | |
getOwnerName () | |
_lookupOwnerName ($a_owner_id) | |
lookup owner name for owner id | |
setOwner ($a_owner) | |
set object owner | |
getCreateDate () | |
get create date public | |
getLastUpdateDate () | |
get last update date public | |
getDiskUsage () | |
Gets the disk usage of the object in bytes. | |
setObjDataRecord ($a_record) | |
set object_data record (note: this method should only be called from the ilObjectFactory class) | |
MDUpdateListener ($a_element) | |
Meta data update listener. | |
createMetaData () | |
create meta data entry | |
updateMetaData () | |
update meta data entry | |
deleteMetaData () | |
delete meta data entry | |
updateOwner () | |
update owner of object in db | |
_getIdForImportId ($a_import_id) | |
get current object id for import id (static) | |
_lookupOwner ($a_id) | |
lookup object owner | |
_lookupLastUpdate ($a_id, $a_as_string=false) | |
lookup last update | |
_getLastUpdateOfObjects ($a_objs) | |
Get last update for a set of media objects. | |
_setDeletedDate ($a_ref_id) | |
only called in ilTree::saveSubTree | |
_resetDeletedDate ($a_ref_id) | |
only called in ilObjectGUI::insertSavedNodes | |
_lookupDeletedDate ($a_ref_id) | |
only called in ilObjectGUI::insertSavedNodes | |
_writeTitle ($a_obj_id, $a_title) | |
write title to db (static) | |
_writeDescription ($a_obj_id, $a_desc) | |
write description to db (static) | |
_writeImportId ($a_obj_id, $a_import_id) | |
write import id to db (static) | |
_isInTrash ($a_ref_id) | |
checks wether object is in trash | |
_hasUntrashedReference ($a_obj_id) | |
checks wether an object has at least one reference that is not in trash | |
_getObjectsDataForType ($a_type, $a_omit_trash=false) | |
get all objects of a certain type | |
putInTree ($a_parent_ref) | |
maybe this method should be in tree object!? | |
setPermissions ($a_parent_ref) | |
set permissions of object | |
setParentRolePermissions ($a_parent_ref) | |
Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. | |
createReference () | |
creates reference for object | |
countReferences () | |
count references of object | |
initDefaultRoles () | |
init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public | |
applyDidacticTemplate ($a_tpl_id) | |
Apply template. | |
notify ($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0) | |
notifys an object about an event occured Based on the event passed, each object may decide how it reacts. | |
setRegisterMode ($a_bool) | |
isUserRegistered ($a_user_id=0) | |
requireRegistration () | |
getXMLZip () | |
getHTMLDirectory () | |
cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false) | |
Clone object permissions, put in tree ... | |
appendCopyInfo ($a_target_id, $a_copy_id) | |
Prepend Copy info if object with same name exists in that container. | |
cloneDependencies ($a_target_id, $a_copy_id) | |
Clone object dependencies. | |
cloneMetaData ($target_obj) | |
Copy meta data. | |
_lookupCreationDate ($a_id) | |
Lookup creation date. |
Static Public Member Functions | |
static | createDefaultRole ($a_title, $a_description, $a_tpl_name, $a_ref_id) |
static | _getRolesByAuthMode ($a_auth_mode) |
Get roles by auth mode. | |
static | _resetAuthMode ($a_auth_mode) |
Reset auth mode to default. | |
static | isAutoGenerated ($a_role_id) |
Static Public Member Functions inherited from ilObject | |
static | _lookupObjIdByImportId ($a_import_id) |
static | _getAllReferences ($a_id) |
get all reference ids of object | |
static | _lookupTitle ($a_id) |
lookup object title | |
static | _getIdsForTitle ($title, $type= '', $partialmatch=false) |
static | _lookupDescription ($a_id) |
lookup object description | |
static | _lookupObjId ($a_id) |
static | setDeletedDates ($a_ref_ids) |
Set deleted date type $ilDB. | |
static | _lookupType ($a_id, $a_reference=false) |
lookup object type | |
static | _lookupObjectId ($a_ref_id) |
lookup object id | |
static | _exists ($a_id, $a_reference=false, $a_type=null) |
checks if an object exists in object_data | |
static | _getObjectsByType ($a_obj_type="", $a_owner="") |
Get objects by type. | |
static | _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true) |
Prepare copy wizard object selection. | |
static | _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false) |
Get icon for repository item. | |
static | collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0) |
Collect deletion dependencies. | |
static | getDeletionDependencies ($a_obj_id) |
Get deletion dependencies. | |
static | getLongDescriptions (array $a_obj_ids) |
Get long description data. | |
static | getAllOwnedRepositoryObjects ($a_user_id) |
Get all ids of objects user owns. | |
static | hasAutoRating ($a_type, $a_ref_id) |
Check if auto rating is active for parent group/course. |
Data Fields | |
const | MODE_PROTECTED_DELETE_LOCAL_POLICIES = 1 |
const | MODE_PROTECTED_KEEP_LOCAL_POLICIES = 2 |
const | MODE_UNPROTECTED_DELETE_LOCAL_POLICIES = 3 |
const | MODE_UNPROTECTED_KEEP_LOCAL_POLICIES = 4 |
$parent | |
$allow_register | |
$assign_users | |
$disk_quota | |
The disk quota in bytes. | |
$wsp_disk_quota | |
Data Fields inherited from ilObject | |
const | TITLE_LENGTH = 255 |
max length of object title | |
const | DESC_LENGTH = 128 |
$ilias | |
$lng | |
$id | |
$ref_id | |
$type | |
$title | |
$untranslatedTitle | |
$desc | |
$long_desc | |
$owner | |
$create_date | |
$last_update | |
$import_id | |
$register = false | |
$referenced | |
$objectList | |
$max_title | |
$max_desc | |
$add_dots | |
$obj_data_record | |
object_data record |
Protected Member Functions | |
deleteLocalPolicies ($a_start, $a_policies, $a_filter) | |
Delete local policies. | |
adjustPermissions ($a_mode, $a_nodes, $a_policies, $a_filter, $a_exclusion_filter=array()) | |
Adjust permissions. | |
isHandledObjectType ($a_filter, $a_exclusion_filter, $a_type) | |
Check if type is filterer. | |
updateOperationStack (&$a_stack, $a_node, $a_init=false) | |
Update operation stack. | |
updatePolicyStack (&$a_stack, $a_node) | |
Update policy stack. | |
createPermissionIntersection ($policy_stack, $a_current_ops, $a_id, $a_type) | |
Create course group permission intersection. |
Class ilObjRole.
Definition at line 15 of file class.ilObjRole.php.
ilObjRole::__getPermissionDefinitions | ( | ) |
Definition at line 591 of file class.ilObjRole.php.
References $ilDB, ilObject\$lng, $txt, and ilPlugin\lookupTxt().
ilObjRole::_getAssignUsersStatus | ( | $a_role_id | ) |
Definition at line 141 of file class.ilObjRole.php.
References $ilDB, $query, $res, and $row.
Referenced by ilRbacReview\getGlobalAssignableRoles(), ilObjUserFolderGUI\importUserRoleAssignmentObject(), ilSoapUserAdministration\importUsers(), ilObjUserFolderGUI\importUsersObject(), ilObjUserGUI\initCreate(), and ilSoapUserAdministration\isPermittedRole().
ilObjRole::_getAuthMode | ( | $a_role_id | ) |
Definition at line 539 of file class.ilObjRole.php.
|
static |
Get roles by auth mode.
public
string | auth mode |
Definition at line 558 of file class.ilObjRole.php.
References $ilDB, $query, $res, and $row.
Referenced by ilRadiusSettings\read().
ilObjRole::_getTranslation | ( | $a_role_title | ) |
Definition at line 504 of file class.ilObjRole.php.
References ilObject\$lng.
Referenced by ilCourseEditParticipantsTableGUI\__construct(), ilObjRoleGUI\adoptPermObject(), ilObjRoleFolderGUI\confirmDeleteObject(), ilObjectRolePermissionTableGUI\createTitle(), ilObjectPermissionStatusGUI\getAssignedValidRoles(), ilObjectPermissionStatusGUI\getAvailableRolesTableData(), ilObjCourse\getLocalCourseRoles(), ilObjGroup\getLocalGroupRoles(), ilObjiLincCourse\getLocalRoles(), ilObjGroupGUI\getLocalRoles(), ilObjCourseGUI\getLocalRoles(), ilObjiLincCourse\getMemberRolesTitle(), getPresentationTitle(), ilObjBlog\getRolesWithContribute(), ilPermissionGUI\initRoleForm(), ilObjiLincCourseGUI\mailMembersObject(), ilObjGroupGUI\mailMembersObject(), ilObjCourseGUI\mailMembersObject(), ilRoleSelectionTableGUI\parse(), ilRoleTableGUI\parse(), ilObjRoleTemplateGUI\permObject(), ilObjUserGUI\roleassignmentObject(), ilPermissionGUI\showConfirmBlockRole(), and ilSoapRoleObjectXMLWriter\start().
ilObjRole::_lookupAllowRegister | ( | $a_role_id | ) |
check whether role is allowed in user registration or not
int | $a_role_id | role id |
Definition at line 359 of file class.ilObjRole.php.
References $ilDB, $query, and $res.
Referenced by ilRegistrationSettingsGUI\editRoles(), and ilAccountRegistrationGUI\saveForm().
ilObjRole::_lookupRegisterAllowed | ( | ) |
get all roles that are activated in user registration
public
Definition at line 333 of file class.ilObjRole.php.
References $ilDB, $query, and $res.
Referenced by ilRegistrationSettingsGUI\__prepareAccessLimitationRoleList(), ilRegistrationSettingsGUI\__prepareRoleList(), ilShopUtils\_createRandomUserAccount(), ilUserProfile\addStandardFieldsToForm(), ilObjAuthSettingsGUI\authSettingsObject(), ilRegistrationSettingsGUI\editRoleAccessLimitations(), and ilRegistrationSettingsGUI\saveRoleAccessLimitations().
|
static |
Reset auth mode to default.
public
string | auth mode |
Definition at line 581 of file class.ilObjRole.php.
References $ilDB, $query, and $res.
Referenced by ilRadiusSettings\save().
ilObjRole::_updateAuthMode | ( | $a_roles | ) |
Definition at line 526 of file class.ilObjRole.php.
References $ilDB, $query, and $res.
Referenced by ilRadiusSettings\save(), and ilObjAuthSettingsGUI\updateAuthRolesObject().
|
protected |
Adjust permissions.
int | $a_mode | |
array | $a_nodes | array of nodes |
array | $a_policies | array of object ref ids |
array | $a_exclusion_filter | of object types. |
Definition at line 706 of file class.ilObjRole.php.
References $GLOBALS, ilRbacLog\add(), createPermissionIntersection(), ilRbacLog\diffFaPa(), ilRbacLog\EDIT_TEMPLATE_EXISTING, ilRbacLog\gatherFaPa(), ilObject\getId(), ilRbacLog\isActive(), isHandledObjectType(), ilTree\RELATION_CHILD, ilTree\RELATION_EQUALS, ilTree\RELATION_NONE, ilTree\RELATION_PARENT, ilTree\RELATION_SIBLING, updateOperationStack(), and updatePolicyStack().
Referenced by changeExistingObjects().
ilObjRole::assignData | ( | $a_data | ) |
loads a record "role" from array public
array | roledata |
Definition at line 185 of file class.ilObjRole.php.
References setAllowRegister(), ilObject\setDescription(), setDiskQuota(), setPersonalWorkspaceDiskQuota(), ilObject\setTitle(), ilUtil\stripSlashes(), and toggleAssignUsersStatus().
Referenced by read().
ilObjRole::changeExistingObjects | ( | $a_start_node, | |
$a_mode, | |||
$a_filter, | |||
$a_exclusion_filter = array() |
|||
) |
Change existing objects.
int | $a_start_node | |
int | $a_mode | |
array | filter Filter of object types (array('all') => change all objects |
Definition at line 636 of file class.ilObjRole.php.
References adjustPermissions(), deleteLocalPolicies(), and ilObject\getId().
ilObjRole::create | ( | ) |
create
public
Reimplemented from ilObject.
Definition at line 225 of file class.ilObjRole.php.
References ilObject\$id, $ilDB, $query, $res, getAllowRegister(), getAssignUsersStatus(), getDiskQuota(), and getPersonalWorkspaceDiskQuota().
|
static |
type | $a_title | |
type | $a_description | |
type | $a_tpl_name | |
type | $a_ref_id |
Definition at line 60 of file class.ilObjRole.php.
References $GLOBALS, $ilDB, $res, $row, ilObject\_lookupType(), DB_FETCHMODE_OBJECT, and ilObjRole().
Referenced by ilObjChatroom\initDefaultRoles(), ilObjOrgUnit\initDefaultRoles(), ilObjForum\initDefaultRoles(), ilObjBlog\initDefaultRoles(), ilObjGroup\initDefaultRoles(), and ilObjCourse\initDefaultRoles().
|
protected |
Create course group permission intersection.
array | operation stack | |
int | $a_id | |
string | $a_type |
Definition at line 961 of file class.ilObjRole.php.
References $GLOBALS, $ilDB, $query, $res, $row, ilObject\$type, ilObject\_lookupObjId(), DB_FETCHMODE_OBJECT, ilObject\getId(), GRP_TYPE_CLOSED, GRP_TYPE_OPEN, and ilObjGroup\lookupGroupTye().
Referenced by adjustPermissions().
ilObjRole::delete | ( | ) |
delete role and all related data
public
Reimplemented from ilObject.
Definition at line 407 of file class.ilObjRole.php.
References $GLOBALS, $ilDB, $query, $res, ilLDAPRoleGroupMappingSettings\_deleteByRole(), ilObject\getId(), and getParent().
|
protected |
Delete local policies.
array | $a_policies | array of object ref ids that define local policies |
Definition at line 676 of file class.ilObjRole.php.
References ilObject\_lookupObjId(), ilObject\_lookupType(), and ilObject\getId().
Referenced by changeExistingObjects().
ilObjRole::getAllowRegister | ( | ) |
get allow_register
public
Definition at line 267 of file class.ilObjRole.php.
Referenced by create(), and ilObjRoleGUI\readRoleProperties().
ilObjRole::getAssignUsersStatus | ( | ) |
Definition at line 136 of file class.ilObjRole.php.
Referenced by create(), ilObjRoleGUI\readRoleProperties(), and update().
ilObjRole::getCountMembers | ( | ) |
Definition at line 497 of file class.ilObjRole.php.
ilObjRole::getDiskQuota | ( | ) |
Gets the minimal disk quota imposed by this role.
Returns the minimal disk quota in bytes. The default value is 0.
public
Definition at line 294 of file class.ilObjRole.php.
References $disk_quota.
Referenced by create(), ilObjRoleGUI\readRoleProperties(), and update().
ilObjRole::getParent | ( | ) |
get reference id of parent object
public
Definition at line 395 of file class.ilObjRole.php.
References $parent.
Referenced by delete().
ilObjRole::getPersonalWorkspaceDiskQuota | ( | ) |
Gets the minimal personal workspace disk quota imposed by this role.
Returns the minimal disk quota in bytes. The default value is 0.
public
Definition at line 322 of file class.ilObjRole.php.
References $wsp_disk_quota.
Referenced by create(), ilObjRoleGUI\readRoleProperties(), and update().
ilObjRole::getPresentationTitle | ( | ) |
return translated title for autogenerated roles
Reimplemented from ilObject.
Definition at line 127 of file class.ilObjRole.php.
References _getTranslation(), and ilObject\getTitle().
ilObjRole::ilObjRole | ( | $a_id = 0 , |
|
$a_call_by_reference = false |
|||
) |
Constructor public.
integer | reference_id or object_id |
boolean | treat the id as reference_id (true) or object_id (false) |
Definition at line 44 of file class.ilObjRole.php.
References ilObject\ilObject().
Referenced by createDefaultRole().
|
static |
Definition at line 624 of file class.ilObjRole.php.
References ilObject\_lookupTitle().
Referenced by ilObjRoleGUI\initFormRoleProperties().
|
protected |
Check if type is filterer.
array | $a_filter | |
string | $a_type |
Definition at line 858 of file class.ilObjRole.php.
Referenced by adjustPermissions().
ilObjRole::read | ( | ) |
loads "role" from database private
Definition at line 158 of file class.ilObjRole.php.
References $ilDB, $query, $res, and assignData().
Referenced by update().
ilObjRole::setAllowRegister | ( | $a_allow_register | ) |
set allow_register of role
public
integer |
Definition at line 251 of file class.ilObjRole.php.
Referenced by assignData(), and ilObjRoleGUI\loadRoleProperties().
ilObjRole::setDiskQuota | ( | $a_disk_quota | ) |
Sets the minimal disk quota imposed by this role.
The minimal disk quota is specified in bytes.
@access public @param integer
Definition at line 280 of file class.ilObjRole.php.
Referenced by assignData(), and ilObjRoleGUI\loadRoleProperties().
ilObjRole::setParent | ( | $a_parent_ref | ) |
set reference id of parent object this is neccessary for non RBAC protected objects!!!
public
integer | ref_id of parent object |
Definition at line 384 of file class.ilObjRole.php.
ilObjRole::setPersonalWorkspaceDiskQuota | ( | $a_disk_quota | ) |
Sets the minimal personal workspace disk quota imposed by this role.
The minimal disk quota is specified in bytes.
@access public @param integer
Definition at line 308 of file class.ilObjRole.php.
Referenced by assignData(), and ilObjRoleGUI\loadRoleProperties().
ilObjRole::toggleAssignUsersStatus | ( | $a_assign_users | ) |
Definition at line 132 of file class.ilObjRole.php.
Referenced by assignData(), and ilObjRoleGUI\loadRoleProperties().
ilObjRole::update | ( | ) |
updates a record "role" and write it into database public
Reimplemented from ilObject.
Definition at line 199 of file class.ilObjRole.php.
References $ilDB, $query, $res, getAssignUsersStatus(), getDiskQuota(), getPersonalWorkspaceDiskQuota(), and read().
|
protected |
Update operation stack.
array | $a_stack | |
int | $a_node |
Definition at line 878 of file class.ilObjRole.php.
References ilObject\getId().
Referenced by adjustPermissions().
|
protected |
Update policy stack.
object | $a_node |
Definition at line 927 of file class.ilObjRole.php.
Referenced by adjustPermissions().
ilObjRole::validate | ( | ) |
Validate role data.
Definition at line 111 of file class.ilObjRole.php.
References $ilErr, and ilObject\getTitle().
ilObjRole::$allow_register |
Definition at line 31 of file class.ilObjRole.php.
ilObjRole::$assign_users |
Definition at line 32 of file class.ilObjRole.php.
ilObjRole::$disk_quota |
The disk quota in bytes.
Definition at line 35 of file class.ilObjRole.php.
Referenced by getDiskQuota().
ilObjRole::$parent |
Definition at line 29 of file class.ilObjRole.php.
Referenced by getParent().
ilObjRole::$wsp_disk_quota |
Definition at line 36 of file class.ilObjRole.php.
Referenced by getPersonalWorkspaceDiskQuota().
const ilObjRole::MODE_PROTECTED_DELETE_LOCAL_POLICIES = 1 |
Definition at line 17 of file class.ilObjRole.php.
Referenced by ilDidacticTemplateLocalPolicyAction\createLocalPolicy(), ilObjRoleFolderGUI\doCopyRole(), ilDidacticTemplateLocalPolicyAction\revert(), ilDidacticTemplateLocalPolicyAction\revertLocalPolicy(), and ilObjRoleGUI\showChangeExistingObjectsConfirmation().
const ilObjRole::MODE_PROTECTED_KEEP_LOCAL_POLICIES = 2 |
Definition at line 18 of file class.ilObjRole.php.
Referenced by ilPermissionGUI\addRole(), ilObjRoleGUI\permSaveObject(), and ilObjRoleGUI\showChangeExistingObjectsConfirmation().
const ilObjRole::MODE_UNPROTECTED_DELETE_LOCAL_POLICIES = 3 |
Definition at line 19 of file class.ilObjRole.php.
Referenced by ilDidacticTemplateLocalPolicyAction\createLocalPolicy(), ilDidacticTemplateBlockRoleAction\deleteLocalPolicy(), ilObjRoleFolderGUI\doCopyRole(), ilDidacticTemplateLocalPolicyAction\revert(), ilDidacticTemplateLocalPolicyAction\revertLocalPolicy(), and ilObjRoleGUI\showChangeExistingObjectsConfirmation().
const ilObjRole::MODE_UNPROTECTED_KEEP_LOCAL_POLICIES = 4 |
Definition at line 20 of file class.ilObjRole.php.
Referenced by ilPermissionGUI\addRole(), ilObjRoleGUI\permSaveObject(), and ilObjRoleGUI\showChangeExistingObjectsConfirmation().