|
10 | 10 |
|
11 | 11 | use OCA\WorkflowEngine\Helper\ScopeContext; |
12 | 12 | use OCA\WorkflowEngine\Manager; |
| 13 | +use OCP\AppFramework\Http\Attribute\NoAdminRequired; |
13 | 14 | use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired; |
14 | 15 | use OCP\AppFramework\Http\DataResponse; |
15 | 16 | use OCP\AppFramework\OCS\OCSBadRequestException; |
@@ -44,47 +45,46 @@ public function __construct( |
44 | 45 | * |
45 | 46 | * Example: curl -u joann -H "OCS-APIREQUEST: true" "http://my.nc.srvr/ocs/v2.php/apps/workflowengine/api/v1/workflows/user?format=json" |
46 | 47 | * |
47 | | - * @NoAdminRequired |
48 | 48 | * @throws OCSForbiddenException |
49 | 49 | */ |
| 50 | + #[NoAdminRequired] |
50 | 51 | public function index(): DataResponse { |
51 | 52 | return parent::index(); |
52 | 53 | } |
53 | 54 |
|
54 | 55 | /** |
55 | | - * @NoAdminRequired |
56 | | - * |
57 | 56 | * Example: curl -u joann -H "OCS-APIREQUEST: true" "http://my.nc.srvr/ocs/v2.php/apps/workflowengine/api/v1/workflows/user/OCA\\Workflow_DocToPdf\\Operation?format=json" |
58 | 57 | * @throws OCSForbiddenException |
59 | 58 | */ |
| 59 | + #[NoAdminRequired] |
60 | 60 | public function show(string $id): DataResponse { |
61 | 61 | return parent::show($id); |
62 | 62 | } |
63 | 63 |
|
64 | 64 | /** |
65 | | - * @NoAdminRequired |
66 | 65 | * @throws OCSBadRequestException |
67 | 66 | * @throws OCSForbiddenException |
68 | 67 | */ |
| 68 | + #[NoAdminRequired] |
69 | 69 | #[PasswordConfirmationRequired] |
70 | 70 | public function create(string $class, string $name, array $checks, string $operation, string $entity, array $events): DataResponse { |
71 | 71 | return parent::create($class, $name, $checks, $operation, $entity, $events); |
72 | 72 | } |
73 | 73 |
|
74 | 74 | /** |
75 | | - * @NoAdminRequired |
76 | 75 | * @throws OCSBadRequestException |
77 | 76 | * @throws OCSForbiddenException |
78 | 77 | */ |
| 78 | + #[NoAdminRequired] |
79 | 79 | #[PasswordConfirmationRequired] |
80 | 80 | public function update(int $id, string $name, array $checks, string $operation, string $entity, array $events): DataResponse { |
81 | 81 | return parent::update($id, $name, $checks, $operation, $entity, $events); |
82 | 82 | } |
83 | 83 |
|
84 | 84 | /** |
85 | | - * @NoAdminRequired |
86 | 85 | * @throws OCSForbiddenException |
87 | 86 | */ |
| 87 | + #[NoAdminRequired] |
88 | 88 | #[PasswordConfirmationRequired] |
89 | 89 | public function destroy(int $id): DataResponse { |
90 | 90 | return parent::destroy($id); |
|
0 commit comments