Skip to content

Commit 6e8d772

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 6e8d772

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ public CompletableFuture<AppIdentity> updateAppIdentity(ServiceRequestContext ct
260260
public CompletableFuture<Token> regenerateTokenSecret(ServiceRequestContext ctx,
261261
@Param String appId,
262262
Author author, User loginUser) {
263+
// The permission is checked at the HTTP layer like the other endpoints; the metadata layer is
264+
// caller-agnostic and validates only the token state.
263265
return getTokenOrRespondForbidden(ctx, appId, loginUser).thenCompose(
264266
token -> {
265267
if (token.isDeleted()) {

0 commit comments

Comments
 (0)