19 declare(strict_types=1);
34 self::RBAC_OP_EDIT_PERMISSIONS,
35 self::RBAC_OP_VISIBLE,
51 return hash(
"sha256", self::class .
"::" . $this->type);
56 $operations = implode(
",", $this->valid_operations);
57 return "Add standard rbac operations (type=$this->type;operations=$operations)";
74 $db = $environment->
getResource(Environment::RESOURCE_DATABASE);
77 foreach ($this->valid_operations as $ops_id) {
78 if ($ops_id == self::RBAC_OP_COPY) {
87 "typ_id" => [
"integer", $type_id],
88 "ops_id" => [
"integer", $ops_id]
91 $db->insert(
"rbac_ta", $values);
99 $db = $environment->
getResource(Environment::RESOURCE_DATABASE);
102 foreach ($this->valid_operations as $ops_id) {
103 if ($ops_id == self::RBAC_OP_COPY) {
getPreconditions(Environment $environment)
static _getCustomRBACOperationId(string $operation, ?\ilDBInterface $ilDB=null)
__construct(string $type)
isApplicable(Environment $environment)
static _isRBACOperation(int $type_id, int $ops_id, ?\ilDBInterface $ilDB=null)
const RBAC_OP_EDIT_PERMISSIONS
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
An environment holds resources to be used in the setup process.
static _getObjectTypeIdByTitle(string $type, ?\ilDBInterface $ilDB=null)
achieve(Environment $environment)