| @@ 80-88 (lines=9) @@ | ||
| 77 | * @param DataObject $target |
|
| 78 | * @return bool |
|
| 79 | */ |
|
| 80 | public function canEditTarget(DataObject $target) |
|
| 81 | { |
|
| 82 | $currentUser = Security::getCurrentUser(); |
|
| 83 | if ($currentUser && Permission::checkMember($currentUser, 'ADMIN')) { |
|
| 84 | return true; |
|
| 85 | } |
|
| 86 | ||
| 87 | return null; |
|
| 88 | } |
|
| 89 | ||
| 90 | /** |
|
| 91 | * Does this action restrict viewing of the document? |
|
| @@ 499-508 (lines=10) @@ | ||
| 496 | * @param array $context |
|
| 497 | * @return bool |
|
| 498 | */ |
|
| 499 | public function canCreate($member = null, $context = []) |
|
| 500 | { |
|
| 501 | if (is_null($member)) { |
|
| 502 | if (!Security::getCurrentUser()) { |
|
| 503 | return false; |
|
| 504 | } |
|
| 505 | $member = Security::getCurrentUser(); |
|
| 506 | } |
|
| 507 | return Permission::checkMember($member, 'CREATE_WORKFLOW'); |
|
| 508 | } |
|
| 509 | ||
| 510 | /** |
|
| 511 | * |
|