diff --git a/lib/Capabilities.php b/lib/Capabilities.php index 40d354289..493da10b9 100644 --- a/lib/Capabilities.php +++ b/lib/Capabilities.php @@ -62,7 +62,8 @@ public function getCapabilities(): array { 'version' => $this->appManager->getAppVersion('tables'), 'apiVersions' => [ '1.0', - '2.0' + '2.0', + '2.1', ], 'features' => [ 'favorite', diff --git a/lib/Controller/Api1Controller.php b/lib/Controller/Api1Controller.php index 10fd46adc..d70a0f649 100644 --- a/lib/Controller/Api1Controller.php +++ b/lib/Controller/Api1Controller.php @@ -765,7 +765,7 @@ public function indexViewColumns(int $viewId): DataResponse { * @param bool|null $usergroupMultipleItems Can select multiple users or/and groups, if column is usergroup * @param bool|null $usergroupSelectUsers Can select users, if column type is usergroup * @param bool|null $usergroupSelectGroups Can select groups, if column type is usergroup - * @param bool|null $showUserStatus Whether to show the user's status, if column type is usergroup + * @param bool|null $usergroupShowUserStatus Whether to show the user's status, if column type is usergroup * @param int[]|null $selectedViewIds View IDs where this column should be added to be presented * * @return DataResponse|DataResponse @@ -802,7 +802,7 @@ public function createColumn( ?bool $usergroupMultipleItems = null, ?bool $usergroupSelectUsers = null, ?bool $usergroupSelectGroups = null, - ?bool $showUserStatus = null, + ?bool $usergroupShowUserStatus = null, ?array $selectedViewIds = [] ): DataResponse { @@ -837,7 +837,7 @@ public function createColumn( $usergroupMultipleItems, $usergroupSelectUsers, $usergroupSelectGroups, - $showUserStatus, + $usergroupShowUserStatus, $selectedViewIds )->jsonSerialize()); @@ -884,7 +884,7 @@ public function createColumn( * @param bool|null $usergroupMultipleItems Can select multiple users or/and groups, if column is usergroup * @param bool|null $usergroupSelectUsers Can select users, if column type is usergroup * @param bool|null $usergroupSelectGroups Can select groups, if column type is usergroup - * @param bool|null $showUserStatus Whether to show the user's status, if column type is usergroup + * @param bool|null $usergroupShowUserStatus Whether to show the user's status, if column type is usergroup * * @return DataResponse|DataResponse * @@ -917,7 +917,7 @@ public function updateColumn( ?bool $usergroupMultipleItems, ?bool $usergroupSelectUsers, ?bool $usergroupSelectGroups, - ?bool $showUserStatus, + ?bool $usergroupShowUserStatus, ): DataResponse { try { @@ -950,7 +950,7 @@ public function updateColumn( $usergroupMultipleItems, $usergroupSelectUsers, $usergroupSelectGroups, - $showUserStatus, + $usergroupShowUserStatus, ); return new DataResponse($item->jsonSerialize()); } catch (InternalError $e) { @@ -1483,7 +1483,7 @@ public function createTableShare(int $tableId, string $receiver, string $receive * @param bool|null $usergroupMultipleItems Can select multiple users or/and groups, if column is usergroup * @param bool|null $usergroupSelectUsers Can select users, if column type is usergroup * @param bool|null $usergroupSelectGroups Can select groups, if column type is usergroup - * @param bool|null $showUserStatus Whether to show the user's status, if column type is usergroup + * @param bool|null $usergroupShowUserStatus Whether to show the user's status, if column type is usergroup * @param int[]|null $selectedViewIds View IDs where this column should be added to be presented * * @return DataResponse|DataResponse @@ -1520,7 +1520,7 @@ public function createTableColumn( ?bool $usergroupMultipleItems = null, ?bool $usergroupSelectUsers = null, ?bool $usergroupSelectGroups = null, - ?bool $showUserStatus = null, + ?bool $usergroupShowUserStatus = null, ?array $selectedViewIds = [] ): DataResponse { try { @@ -1554,7 +1554,7 @@ public function createTableColumn( $usergroupMultipleItems, $usergroupSelectUsers, $usergroupSelectGroups, - $showUserStatus, + $usergroupShowUserStatus, $selectedViewIds ); diff --git a/lib/Migration/Version000800Date20240712000000.php b/lib/Migration/Version000800Date20240712000000.php index 3c0644ea9..726d7929e 100644 --- a/lib/Migration/Version000800Date20240712000000.php +++ b/lib/Migration/Version000800Date20240712000000.php @@ -20,10 +20,10 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); - $hasChanges = $this->createUserGroupTable($schema, 'usergroup', Types::TEXT); - $hasChanges = $this->haveUserGroupColumnDefinitionFields($schema) ?? $hasChanges; + $changes = $this->createUserGroupTable($schema, 'usergroup', Types::TEXT); + $changes = $this->haveUserGroupColumnDefinitionFields($schema) ?? $changes; - return $hasChanges; + return $changes; } private function createUserGroupTable(ISchemaWrapper $schema, string $name, string $type): ?ISchemaWrapper { diff --git a/openapi.json b/openapi.json index 2adfa4bb2..9e06758db 100644 --- a/openapi.json +++ b/openapi.json @@ -2986,7 +2986,7 @@ "nullable": true, "description": "Can select groups, if column type is usergroup" }, - "showUserStatus": { + "usergroupShowUserStatus": { "type": "boolean", "nullable": true, "description": "Whether to show the user's status, if column type is usergroup" @@ -3335,7 +3335,7 @@ "nullable": true, "description": "Can select groups, if column type is usergroup" }, - "showUserStatus": { + "usergroupShowUserStatus": { "type": "boolean", "nullable": true, "description": "Whether to show the user's status, if column type is usergroup" @@ -3549,7 +3549,7 @@ "nullable": true, "description": "Can select groups, if column type is usergroup" }, - "showUserStatus": { + "usergroupShowUserStatus": { "type": "boolean", "nullable": true, "description": "Whether to show the user's status, if column type is usergroup" diff --git a/src/types/openapi/openapi.ts b/src/types/openapi/openapi.ts index e57d3a011..b38fd9ea3 100644 --- a/src/types/openapi/openapi.ts +++ b/src/types/openapi/openapi.ts @@ -2209,7 +2209,7 @@ export interface operations { /** @description Can select groups, if column type is usergroup */ readonly usergroupSelectGroups?: boolean | null; /** @description Whether to show the user's status, if column type is usergroup */ - readonly showUserStatus?: boolean | null; + readonly usergroupShowUserStatus?: boolean | null; /** * @description View IDs where this column should be added to be presented * @default [] @@ -2410,7 +2410,7 @@ export interface operations { /** @description Can select groups, if column type is usergroup */ readonly usergroupSelectGroups?: boolean | null; /** @description Whether to show the user's status, if column type is usergroup */ - readonly showUserStatus?: boolean | null; + readonly usergroupShowUserStatus?: boolean | null; /** * @description View IDs where this column should be added to be presented * @default [] @@ -2587,7 +2587,7 @@ export interface operations { /** @description Can select groups, if column type is usergroup */ readonly usergroupSelectGroups?: boolean | null; /** @description Whether to show the user's status, if column type is usergroup */ - readonly showUserStatus?: boolean | null; + readonly usergroupShowUserStatus?: boolean | null; }; }; };