Problem/Motivation
Introducing WorkflowUser as a decorator for User facilitates some coding.
- public function isOwner(EntityInterface $entity): bool;
- public function addOwnerRole(EntityInterface $entity): static;
- public function isSuperUser(WorkflowTypeAttributeInterface $entity): bool;
- public function addSuperUserRole(WorkflowTypeAttributeInterface $entity): static;
It replaces static functions in WorkflowRole Object:
- public static function addOwnerRole(UserInterface $user, ?EntityInterface $entity = NULL): void;
- public static function isOwner(AccountInterface $account, ?EntityInterface $entity = NULL): bool;
Comments
Comment #3
johnvComment #10
johnvComment #12
johnvComment #14
johnvA hook_update() is introduced for people having updated to 2.1.8, before the update from #9.