ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilUDFPermissionHelper Class Reference

UDF permission helper. More...

+ Inheritance diagram for ilUDFPermissionHelper:
+ Collaboration diagram for ilUDFPermissionHelper:

Data Fields

const CONTEXT_UDF = 1
 
const CONTEXT_FIELD = 2
 
const ACTION_UDF_CREATE_FIELD = 1
 
const ACTION_FIELD_EDIT = 1
 
const ACTION_FIELD_DELETE = 2
 
const ACTION_FIELD_EDIT_PROPERTY = 3
 
const ACTION_FIELD_EDIT_ACCESS = 4
 
const SUBACTION_FIELD_TITLE = 1
 
const SUBACTION_FIELD_PROPERTIES = 2
 
const SUBACTION_FIELD_ACCESS_VISIBLE_PERSONAL = 1
 
const SUBACTION_FIELD_ACCESS_VISIBLE_REGISTRATION = 2
 
const SUBACTION_FIELD_ACCESS_VISIBLE_LOCAL = 3
 
const SUBACTION_FIELD_ACCESS_VISIBLE_COURSES = 4
 
const SUBACTION_FIELD_ACCESS_VISIBLE_GROUPS = 5
 
const SUBACTION_FIELD_ACCESS_CHANGEABLE_PERSONAL = 6
 
const SUBACTION_FIELD_ACCESS_CHANGEABLE_LOCAL = 7
 
const SUBACTION_FIELD_ACCESS_REQUIRED = 8
 
const SUBACTION_FIELD_ACCESS_EXPORT = 9
 
const SUBACTION_FIELD_ACCESS_SEARCHABLE = 10
 
const SUBACTION_FIELD_ACCESS_CERTIFICATE = 11
 

Protected Member Functions

 readContextIds ($a_context_type)
 
 buildPermissionMap ()
 
 getActivePlugins ()
 
- Protected Member Functions inherited from ilClaimingPermissionHelper
 __construct ($a_user_id, $a_ref_id)
 Constructor. More...
 
 setUserId ($a_value)
 Set user id. More...
 
 getUserId ()
 Get user id. More...
 
 setRefId ($a_value)
 Set ref id. More...
 
 getRefId ()
 Get ref id. More...
 
 readContextIds ($a_context_type)
 Get all context ids for context type (from DB, is cached) More...
 
 buildPermissionMap ()
 Build map of context and actions. More...
 
 isValidContextAndAction ($a_context_type, $a_context_id, $a_action_id, $a_action_sub_id=null)
 Check if given combination of context and action is valid. More...
 
 getValidContextIds ($a_context_type)
 Get context ids for context type (uses cache) More...
 
 checkPermission ($a_context_type, $a_context_id, $a_action_id, $a_action_sub_id=null)
 Check permission (helper: rbac, plugins) More...
 
 checkRBAC ()
 Check permission against RBAC. More...
 
 getActivePlugins ()
 Get active plugins (for current slot) More...
 
 checkPlugins ($a_context_type, $a_context_id, $a_action_id, $a_action_sub_id=null)
 Check permission against plugins. More...
 

Additional Inherited Members

- Public Member Functions inherited from ilClaimingPermissionHelper
 reset ()
 Reset (internal caches) More...
 
 hasPermission ($a_context_type, $a_context_id, $a_action_id, $a_action_sub_id=null)
 Check permission. More...
 
 hasPermissions ($a_context_type, $a_context_id, array $a_action_ids)
 Check permissions. More...
 
- Static Public Member Functions inherited from ilClaimingPermissionHelper
static getInstance ($a_user_id=null, $a_ref_id=null)
 Factory. More...
 
- Protected Attributes inherited from ilClaimingPermissionHelper
 $user_id
 
 $ref_id
 
 $map
 
 $context_ids
 
 $plugins
 
- Static Protected Attributes inherited from ilClaimingPermissionHelper
static $instances
 

Detailed Description

UDF permission helper.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 14 of file class.ilUDFPermissionHelper.php.

Member Function Documentation

◆ buildPermissionMap()

ilUDFPermissionHelper::buildPermissionMap ( )
protected

Definition at line 75 of file class.ilUDFPermissionHelper.php.

76  {
77  return array(
78  self::CONTEXT_UDF => array(
79  "actions" => array(
80  self::ACTION_UDF_CREATE_FIELD
81  )
82  ),
83  self::CONTEXT_FIELD => array(
84  "actions" => array(
85  self::ACTION_FIELD_EDIT,
86  self::ACTION_FIELD_DELETE
87  ),
88  "subactions" => array(
89  self::ACTION_FIELD_EDIT_PROPERTY =>
90  array(
91  self::SUBACTION_FIELD_TITLE
92  ,self::SUBACTION_FIELD_PROPERTIES
93  )
94  ,self::ACTION_FIELD_EDIT_ACCESS =>
95  array(
96  self::SUBACTION_FIELD_ACCESS_VISIBLE_PERSONAL
97  ,self::SUBACTION_FIELD_ACCESS_VISIBLE_REGISTRATION
98  ,self::SUBACTION_FIELD_ACCESS_VISIBLE_LOCAL
99  ,self::SUBACTION_FIELD_ACCESS_VISIBLE_COURSES
100  ,self::SUBACTION_FIELD_ACCESS_VISIBLE_GROUPS
101  ,self::SUBACTION_FIELD_ACCESS_CHANGEABLE_PERSONAL
102  ,self::SUBACTION_FIELD_ACCESS_CHANGEABLE_LOCAL
103  ,self::SUBACTION_FIELD_ACCESS_REQUIRED
104  ,self::SUBACTION_FIELD_ACCESS_EXPORT
105  ,self::SUBACTION_FIELD_ACCESS_SEARCHABLE
106  ,self::SUBACTION_FIELD_ACCESS_CERTIFICATE
107  )
108  )
109  )
110  );
111  }

◆ getActivePlugins()

ilUDFPermissionHelper::getActivePlugins ( )
protected

Definition at line 116 of file class.ilUDFPermissionHelper.php.

References $DIC, $res, and IL_COMP_SERVICE.

117  {
118  global $DIC;
119 
120  $ilPluginAdmin = $DIC['ilPluginAdmin'];
121 
122  $res = array();
123 
124  foreach ($ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "User", "udfc") as $plugin_name) {
125  $res[] = $ilPluginAdmin->getPluginObject(
127  "User",
128  "udfc",
129  $plugin_name
130  );
131  }
132 
133  return $res;
134  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
const IL_COMP_SERVICE

◆ readContextIds()

ilUDFPermissionHelper::readContextIds (   $a_context_type)
protected

Definition at line 46 of file class.ilUDFPermissionHelper.php.

References $a_context_type, $DIC, $ilDB, $res, and $row.

47  {
48  global $DIC;
49 
50  $ilDB = $DIC['ilDB'];
51 
52  switch ($a_context_type) {
53  case self::CONTEXT_UDF:
54  return array($_REQUEST["ref_id"]);
55 
56  case self::CONTEXT_FIELD:
57  $set = $ilDB->query("SELECT field_id id" .
58  " FROM udf_definition");
59  break;
60 
61  default:
62  return array();
63  }
64 
65  $res = array();
66  while ($row = $ilDB->fetchAssoc($set)) {
67  $res[] = $row["id"];
68  }
69  return $res;
70  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$row
$a_context_type
Definition: workflow.php:96
global $ilDB

Field Documentation

◆ ACTION_FIELD_DELETE

const ilUDFPermissionHelper::ACTION_FIELD_DELETE = 2

Definition at line 23 of file class.ilUDFPermissionHelper.php.

Referenced by ilCustomUserFieldsGUI\deleteField().

◆ ACTION_FIELD_EDIT

const ilUDFPermissionHelper::ACTION_FIELD_EDIT = 1

◆ ACTION_FIELD_EDIT_ACCESS

◆ ACTION_FIELD_EDIT_PROPERTY

const ilUDFPermissionHelper::ACTION_FIELD_EDIT_PROPERTY = 3

◆ ACTION_UDF_CREATE_FIELD

const ilUDFPermissionHelper::ACTION_UDF_CREATE_FIELD = 1

◆ CONTEXT_FIELD

◆ CONTEXT_UDF

const ilUDFPermissionHelper::CONTEXT_UDF = 1

◆ SUBACTION_FIELD_ACCESS_CERTIFICATE

◆ SUBACTION_FIELD_ACCESS_CHANGEABLE_LOCAL

◆ SUBACTION_FIELD_ACCESS_CHANGEABLE_PERSONAL

◆ SUBACTION_FIELD_ACCESS_EXPORT

◆ SUBACTION_FIELD_ACCESS_REQUIRED

◆ SUBACTION_FIELD_ACCESS_SEARCHABLE

◆ SUBACTION_FIELD_ACCESS_VISIBLE_COURSES

◆ SUBACTION_FIELD_ACCESS_VISIBLE_GROUPS

◆ SUBACTION_FIELD_ACCESS_VISIBLE_LOCAL

◆ SUBACTION_FIELD_ACCESS_VISIBLE_PERSONAL

◆ SUBACTION_FIELD_ACCESS_VISIBLE_REGISTRATION

◆ SUBACTION_FIELD_PROPERTIES

const ilUDFPermissionHelper::SUBACTION_FIELD_PROPERTIES = 2

◆ SUBACTION_FIELD_TITLE

const ilUDFPermissionHelper::SUBACTION_FIELD_TITLE = 1

The documentation for this class was generated from the following file: