This is an automated email from the ASF dual-hosted git repository.
cdmikechen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new 077ddbb0 SUBMARINE-1374. Temporary fix for submarine failing to get
user info without authentication
077ddbb0 is described below
commit 077ddbb0c1e69b5bc254ea0c8ed8c9a7dc3203e6
Author: cdmikechen <[email protected]>
AuthorDate: Sat Apr 1 12:24:09 2023 +0800
SUBMARINE-1374. Temporary fix for submarine failing to get user info
without authentication
### What is this PR for?
Getting the user info rest api without authentication mode will fail. We
temporarily need to add a default admin user back to the frontend to keep the
frontend logic consistent.
### What type of PR is it?
Bug Fix
### Todos
* [x] - Add a method to create a default user when using none auth
### What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-1374
### How should this be tested?
NA
### Screenshots (if appropriate)
NA
### Questions:
* Do the license files need updating? No
* Are there breaking changes for older versions? No
* Does this need new documentation? No
Author: cdmikechen <[email protected]>
Signed-off-by: cdmikechen <[email protected]>
Closes #1058 from cdmikechen/SUBMARINE-1374 and squashes the following
commits:
ca383c7d [cdmikechen] Add user default info
---
.../org/apache/submarine/server/rest/workbench/SysUserRestApi.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/workbench/SysUserRestApi.java
b/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/workbench/SysUserRestApi.java
index b4d053f1..e2752006 100644
---
a/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/workbench/SysUserRestApi.java
+++
b/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/workbench/SysUserRestApi.java
@@ -198,6 +198,9 @@ public class SysUserRestApi {
.role(createDefaultRole()).build();
}
}
+ } else {
+ // If no authentication configuration is performed, we retain the
default user for the time being
+ userInfo = createDefaultUser();
}
if (userInfo == null) { // user not found
return new JsonResponse.Builder<>(Response.Status.OK).
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]