sarankk commented on code in PR #165:
URL: https://github.com/apache/cassandra-sidecar/pull/165#discussion_r1906057411
##########
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:
Discussed this offline, decided to have just view permission here.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]