BAIS 권한 서비스를 Spring Java로 전환 (BAIS-E2E-MIG-001)
Some checks are pending
ci / test (push) Waiting to run
Some checks are pending
ci / test (push) Waiting to run
This commit is contained in:
parent
5883ea078f
commit
571419dd30
1 changed files with 11 additions and 0 deletions
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue