Revert "fix(review): allow super admins to approve own promotions"

This reverts commit 738f8b33b8.
This commit is contained in:
dongmucat 2026-04-14 14:02:48 +08:00
parent 738f8b33b8
commit 9644d50fbb
2 changed files with 1 additions and 9 deletions

View file

@ -107,7 +107,7 @@ public class ReviewPermissionChecker {
String userId,
Set<String> platformRoles) {
if (request.getSubmittedBy().equals(userId)) {
return platformRoles.contains("SUPER_ADMIN");
return false;
}
return hasPlatformReviewRole(platformRoles);
}

View file

@ -198,12 +198,4 @@ class ReviewPermissionCheckerTest {
assertFalse(checker.canReviewPromotion(req, userId,
Set.of("SKILL_ADMIN")));
}
@Test
void superAdminCanReviewOwnPromotion() {
String userId = "user-2";
PromotionRequest req = new PromotionRequest(1L, 1L, 1L, userId);
assertTrue(checker.canReviewPromotion(req, userId,
Set.of("SUPER_ADMIN")));
}
}