19 declare(strict_types=1);
39 "SELECT ops_id FROM rbac_operations WHERE operation = %s",
59 JOIN object_reference ON rbac_pa.ref_id = object_reference.ref_id 60 JOIN object_data ON object_reference.obj_id = object_data.obj_id 61 WHERE object_data.type = 'file'; 66 $ops_ids = unserialize($row[
'ops_id'], [
'allowed_classes' =>
false]);
67 if (in_array(4, $ops_ids,
false) && !in_array($edit_file_ops_id, $ops_ids,
false)) {
68 $ops_ids[] = $edit_file_ops_id;
69 $ops_ids = array_unique($ops_ids);
70 $new_ops_ids = serialize($ops_ids);
74 'ops_id' => [
'text', $new_ops_ids]
77 'rol_id' => [
'integer', $row[
'rol_id']],
78 'ref_id' => [
'integer', $row[
'ref_id']]
92 $q =
"SELECT * from rbac_templates WHERE type = %s AND ops_id = %s";
103 'type' => [
'text',
'file'],
104 'ops_id' => [
'integer', $edit_file_ops_id],
105 'rol_id' => [
'integer', $row[
'rol_id']],
106 'parent' => [
'integer', $row[
'parent']]
116 $read_position = $this->
database->fetchAssoc(
118 "SELECT op_order FROM rbac_operations WHERE operation = %s",
120 [Permissions::READ->value]
122 )[
'op_order'] ?? 2000;
128 'op_order' => [
'integer', $read_position + 1]
131 'operation' => [
'text', Permissions::VIEW_CONTENT->value]
getOpsID(ilDBInterface $db, string $operation)
fetchAssoc(ilDBStatement $statement)
step_2()
add to all templates which already have the "edit" operation assigned fo files
step_1()
assign to all roles which already have the "edit" operation assigned fo files
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
prepare(ilDBInterface $db)
queryF(string $query, array $types, array $values)