This is an automated email from the ASF dual-hosted git repository.
pdallig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push:
new 1111736142 [ZEPPELIN-6035] fix Cron setting for Notebook (#4777)
1111736142 is described below
commit 1111736142eee389b659d27d01ff445b3f7d30f2
Author: johannesschillinger-dm
<[email protected]>
AuthorDate: Mon Jul 29 19:54:45 2024 +0200
[ZEPPELIN-6035] fix Cron setting for Notebook (#4777)
Fixes an issue where the Zeppelin Frontend was unable to create or update
cron settings for any notebook. Fixes incorrect parsing of the roles submitted
in the change request.
---
.../src/main/java/org/apache/zeppelin/service/NotebookService.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java
b/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java
index 76d367389b..001e96cd09 100644
---
a/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java
+++
b/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java
@@ -898,8 +898,10 @@ public class NotebookService {
return null;
}
} else {
- String requestCronUser = (String) config.get("cronExecutingUser");
- Set<String> requestCronRoles = (Set<String>)
config.get("cronExecutingRoles");
+ AuthenticationInfo requestingAuth = new
AuthenticationInfo((String)config.get("cronExecutingUser"),(String)
config.get("cronExecutingRoles"), null);
+
+ String requestCronUser = requestingAuth.getUser();
+ Set<String> requestCronRoles = requestingAuth.getRoles();
if
(!authorizationService.hasRunPermission(Collections.singleton(requestCronUser),
note.getId())) {
LOGGER.error("Wrong cronExecutingUser: {}", requestCronUser);