sarankk commented on code in PR #165: URL: https://github.com/apache/cassandra-sidecar/pull/165#discussion_r1903134436
########## server/src/main/java/org/apache/cassandra/sidecar/routes/restore/RestoreJobSummaryHandler.java: ########## @@ -50,6 +59,17 @@ public RestoreJobSummaryHandler(ExecutorPools executorPools, super(instanceMetadataFetcher, executorPools, validator); } + @Override + public Set<Authorization> requiredAuthorizations() + { + String resource = VariableAwareResource.DATA_WITH_KEYSPACE_TABLE.resource(); + Authorization createRestore = SidecarPermissions.CREATE_RESTORE_JOB.toAuthorization(resource); + Authorization viewRestore = SidecarPermissions.VIEW_RESTORE_JOB.toAuthorization(resource); + OrAuthorization createOrView + = new OrAuthorizationImpl().addAuthorization(createRestore).addAuthorization(viewRestore); + return ImmutableSet.of(createOrView); Review Comment: I thought if someone has create permission for restore job, then they should be able to view summary. I can remove create from update handler but for view it makes sense? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org