feat: add server.versionCheck permission (#20555)

* add server.versionCheck permission

* getVersionCheck is no admin-route
This commit is contained in:
Michael
2025-08-05 00:39:05 +02:00
committed by GitHub
parent 42b78c59b5
commit a91bb399f0
6 changed files with 17 additions and 3 deletions

View File

@@ -477,7 +477,9 @@ class ServerApi {
return null;
}
/// Performs an HTTP 'GET /server/version-check' operation and returns the [Response].
/// This endpoint requires the `server.versionCheck` permission.
///
/// Note: This method returns the HTTP [Response].
Future<Response> getVersionCheckWithHttpInfo() async {
// ignore: prefer_const_declarations
final apiPath = r'/server/version-check';
@@ -503,6 +505,7 @@ class ServerApi {
);
}
/// This endpoint requires the `server.versionCheck` permission.
Future<VersionCheckStateResponseDto?> getVersionCheck() async {
final response = await getVersionCheckWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {