|
13 | 13 | use OC\Core\ResponseDefinitions; |
14 | 14 | use OC\Files\SimpleFS\SimpleFile; |
15 | 15 | use OCP\AppFramework\Http; |
16 | | -use OCP\AppFramework\Http\Attribute\AnonRateLimit; |
17 | 16 | use OCP\AppFramework\Http\Attribute\ApiRoute; |
18 | 17 | use OCP\AppFramework\Http\Attribute\ExAppRequired; |
19 | 18 | use OCP\AppFramework\Http\Attribute\NoAdminRequired; |
20 | | -use OCP\AppFramework\Http\Attribute\PublicPage; |
21 | 19 | use OCP\AppFramework\Http\Attribute\UserRateLimit; |
22 | 20 | use OCP\AppFramework\Http\DataDownloadResponse; |
23 | 21 | use OCP\AppFramework\Http\DataResponse; |
@@ -64,7 +62,7 @@ public function __construct( |
64 | 62 | * |
65 | 63 | * 200: Task types returned |
66 | 64 | */ |
67 | | - #[PublicPage] |
| 65 | + #[NoAdminRequired] |
68 | 66 | #[ApiRoute(verb: 'GET', url: '/tasktypes', root: '/taskprocessing')] |
69 | 67 | public function taskTypes(): DataResponse { |
70 | 68 | $taskTypes = array_map(function (array $tt) { |
@@ -115,9 +113,8 @@ public function taskTypes(): DataResponse { |
115 | 113 | * 412: Scheduling task is not possible |
116 | 114 | * 401: Cannot schedule task because it references files in its input that the user doesn't have access to |
117 | 115 | */ |
118 | | - #[PublicPage] |
119 | 116 | #[UserRateLimit(limit: 20, period: 120)] |
120 | | - #[AnonRateLimit(limit: 5, period: 120)] |
| 117 | + #[NoAdminRequired] |
121 | 118 | #[ApiRoute(verb: 'POST', url: '/schedule', root: '/taskprocessing')] |
122 | 119 | public function schedule( |
123 | 120 | array $input, string $type, string $appId, string $customId = '', |
@@ -158,7 +155,7 @@ public function schedule( |
158 | 155 | * 200: Task returned |
159 | 156 | * 404: Task not found |
160 | 157 | */ |
161 | | - #[PublicPage] |
| 158 | + #[NoAdminRequired] |
162 | 159 | #[ApiRoute(verb: 'GET', url: '/task/{id}', root: '/taskprocessing')] |
163 | 160 | public function getTask(int $id): DataResponse { |
164 | 161 | try { |
|
0 commit comments