This is an automated email from the ASF dual-hosted git repository.
pdallig pushed a commit to branch branch-0.11
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/branch-0.11 by this push:
new fd6c4ae3eb [ZEPPELIN-6035] fix Cron setting for Notebook (#4777)
fd6c4ae3eb is described below
commit fd6c4ae3eb3fa261e8bb53c309e19998a5a6251b
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);