Skip to content

Commit 37438e7

Browse files
committed
Explain why the permission check stays at the HTTP layer
Motivation: It was asked during the review why the permission check of the secret regeneration is not performed inside the content transformer. Modifications: - Add a comment that the metadata layer is caller-agnostic and the permission is checked at the HTTP layer like the other endpoints. Result: - No behavior change.
1 parent 4546802 commit 37438e7

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

server/src/main/java/com/linecorp/centraldogma/server/internal/api/sysadmin/AppIdentityRegistryService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ public CompletableFuture<AppIdentity> updateAppIdentity(ServiceRequestContext ct
260260
public CompletableFuture<Token> regenerateTokenSecret(ServiceRequestContext ctx,
261261
@Param String appId,
262262
Author author, User loginUser) {
263+
// Permission is checked at the HTTP layer; the metadata layer is caller-agnostic.
263264
return getTokenOrRespondForbidden(ctx, appId, loginUser).thenCompose(
264265
token -> {
265266
if (token.isDeleted()) {

0 commit comments

Comments
 (0)