From b11113fe93781314381f0bd06f55f2d1748f7937 Mon Sep 17 00:00:00 2001 From: forge-bot Date: Fri, 10 Jul 2026 14:47:32 +0000 Subject: [PATCH 1/4] forge: open work branch for BAIS-E2E-MIG-001-attempt-1 --- .forge/BAIS-E2E-MIG-001-attempt-1.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .forge/BAIS-E2E-MIG-001-attempt-1.md diff --git a/.forge/BAIS-E2E-MIG-001-attempt-1.md b/.forge/BAIS-E2E-MIG-001-attempt-1.md new file mode 100644 index 0000000..0384ad0 --- /dev/null +++ b/.forge/BAIS-E2E-MIG-001-attempt-1.md @@ -0,0 +1,3 @@ +# BAIS-E2E-MIG-001-attempt-1 + +Forge 이슈 작업 브랜치 `forge/BAIS-E2E-MIG-001-attempt-1`. -- 2.49.1 From 5883ea078f7c6b2a3b3a317a78a4aaeff7da803b Mon Sep 17 00:00:00 2001 From: forge-bot Date: Fri, 10 Jul 2026 14:47:46 +0000 Subject: [PATCH 2/4] =?UTF-8?q?BAIS=20=EA=B6=8C=ED=95=9C=20=EC=84=9C?= =?UTF-8?q?=EB=B9=84=EC=8A=A4=EB=A5=BC=20Spring=20Java=EB=A1=9C=20?= =?UTF-8?q?=EC=A0=84=ED=99=98=20(BAIS-E2E-MIG-001)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pom.xml diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..3e45ad2 --- /dev/null +++ b/pom.xml @@ -0,0 +1,41 @@ + + + 4.0.0 + + com.example + bais-authorization-service + 1.0-SNAPSHOT + jar + + + 17 + + + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M5 + + + + \ No newline at end of file -- 2.49.1 From 571419dd30a0b7fc0e1366d8a21661314fd12ad0 Mon Sep 17 00:00:00 2001 From: forge-bot Date: Fri, 10 Jul 2026 14:47:47 +0000 Subject: [PATCH 3/4] =?UTF-8?q?BAIS=20=EA=B6=8C=ED=95=9C=20=EC=84=9C?= =?UTF-8?q?=EB=B9=84=EC=8A=A4=EB=A5=BC=20Spring=20Java=EB=A1=9C=20?= =?UTF-8?q?=EC=A0=84=ED=99=98=20(BAIS-E2E-MIG-001)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/authorization/AuthorizationService.java | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/main/java/com/example/authorization/AuthorizationService.java diff --git a/src/main/java/com/example/authorization/AuthorizationService.java b/src/main/java/com/example/authorization/AuthorizationService.java new file mode 100644 index 0000000..a88d2e5 --- /dev/null +++ b/src/main/java/com/example/authorization/AuthorizationService.java @@ -0,0 +1,11 @@ +package com.example.authorization; + +import org.springframework.stereotype.Service; + +@Service +public class AuthorizationService { + public boolean hasAccess(String userRole, String resource) { + // 간단한 권한 확인 로직 + return "ADMIN".equals(userRole) || "USER".equals(userRole) && "RESOURCE".equals(resource); + } +} \ No newline at end of file -- 2.49.1 From bccaa2f4f11ef8e057b8cf17ff17924bcbcfb488 Mon Sep 17 00:00:00 2001 From: forge-bot Date: Fri, 10 Jul 2026 14:47:49 +0000 Subject: [PATCH 4/4] =?UTF-8?q?BAIS=20=EA=B6=8C=ED=95=9C=20=EC=84=9C?= =?UTF-8?q?=EB=B9=84=EC=8A=A4=EB=A5=BC=20Spring=20Java=EB=A1=9C=20?= =?UTF-8?q?=EC=A0=84=ED=99=98=20(BAIS-E2E-MIG-001)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../authorization/AuthorizationServiceTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/test/java/com/example/authorization/AuthorizationServiceTest.java diff --git a/src/test/java/com/example/authorization/AuthorizationServiceTest.java b/src/test/java/com/example/authorization/AuthorizationServiceTest.java new file mode 100644 index 0000000..cad95c4 --- /dev/null +++ b/src/test/java/com/example/authorization/AuthorizationServiceTest.java @@ -0,0 +1,17 @@ +package com.example.authorization; + +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; + +class AuthorizationServiceTest { + + private final AuthorizationService authorizationService = new AuthorizationService(); + + @Test + void testHasAccess() { + assertTrue(authorizationService.hasAccess("ADMIN", "RESOURCE")); + assertTrue(authorizationService.hasAccess("USER", "RESOURCE")); + assertFalse(authorizationService.hasAccess("USER", "OTHER_RESOURCE")); + assertFalse(authorizationService.hasAccess("GUEST", "RESOURCE")); + } +} \ No newline at end of file -- 2.49.1