Skip to content

Commit 450c085

Browse files
Merge pull request #46825 from nextcloud/refactor/workflowengine/security-attributes
2 parents c7315a0 + e64667d commit 450c085

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

apps/workflowengine/lib/Controller/RequestTimeController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
namespace OCA\WorkflowEngine\Controller;
77

88
use OCP\AppFramework\Controller;
9+
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
910
use OCP\AppFramework\Http\JSONResponse;
1011

1112
class RequestTimeController extends Controller {
1213

1314
/**
14-
* @NoAdminRequired
15-
*
1615
* @param string $search
1716
* @return JSONResponse
1817
*/
18+
#[NoAdminRequired]
1919
public function getTimezones($search = '') {
2020
$timezones = \DateTimeZone::listIdentifiers();
2121

apps/workflowengine/lib/Controller/UserWorkflowsController.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use OCA\WorkflowEngine\Helper\ScopeContext;
1212
use OCA\WorkflowEngine\Manager;
13+
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
1314
use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
1415
use OCP\AppFramework\Http\DataResponse;
1516
use OCP\AppFramework\OCS\OCSBadRequestException;
@@ -44,47 +45,46 @@ public function __construct(
4445
*
4546
* Example: curl -u joann -H "OCS-APIREQUEST: true" "http://my.nc.srvr/ocs/v2.php/apps/workflowengine/api/v1/workflows/user?format=json"
4647
*
47-
* @NoAdminRequired
4848
* @throws OCSForbiddenException
4949
*/
50+
#[NoAdminRequired]
5051
public function index(): DataResponse {
5152
return parent::index();
5253
}
5354

5455
/**
55-
* @NoAdminRequired
56-
*
5756
* 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"
5857
* @throws OCSForbiddenException
5958
*/
59+
#[NoAdminRequired]
6060
public function show(string $id): DataResponse {
6161
return parent::show($id);
6262
}
6363

6464
/**
65-
* @NoAdminRequired
6665
* @throws OCSBadRequestException
6766
* @throws OCSForbiddenException
6867
*/
68+
#[NoAdminRequired]
6969
#[PasswordConfirmationRequired]
7070
public function create(string $class, string $name, array $checks, string $operation, string $entity, array $events): DataResponse {
7171
return parent::create($class, $name, $checks, $operation, $entity, $events);
7272
}
7373

7474
/**
75-
* @NoAdminRequired
7675
* @throws OCSBadRequestException
7776
* @throws OCSForbiddenException
7877
*/
78+
#[NoAdminRequired]
7979
#[PasswordConfirmationRequired]
8080
public function update(int $id, string $name, array $checks, string $operation, string $entity, array $events): DataResponse {
8181
return parent::update($id, $name, $checks, $operation, $entity, $events);
8282
}
8383

8484
/**
85-
* @NoAdminRequired
8685
* @throws OCSForbiddenException
8786
*/
87+
#[NoAdminRequired]
8888
#[PasswordConfirmationRequired]
8989
public function destroy(int $id): DataResponse {
9090
return parent::destroy($id);

0 commit comments

Comments
 (0)