-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
src/main/java/aplus/insurancesystem/common/security/AplusAccessDeniedHandler.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 32 additions & 6 deletions
38
src/main/java/aplus/insurancesystem/common/security/RoleToPath.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,37 @@ | ||
package aplus.insurancesystem.common.security; | ||
|
||
import static org.springframework.http.HttpMethod.*; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
public class RoleToPath { | ||
|
||
private static final String CUSTOMER_URL = "/customers"; | ||
private static final String INSURANCE_URL = "/insurances"; | ||
private static final String TERMS_URL = "/terms"; | ||
private static final String CONTRACT_URL = "/contracts"; | ||
private static final String PAYMENT_URL = "/payments"; | ||
private static final String INSURANCE_APPLICATION_URL = "/insurance-applications"; | ||
private static final String BASE_URL = "/api"; | ||
|
||
private static final String CUSTOMER_URL = BASE_URL + "/customers"; | ||
private static final String INSURANCE_URL = BASE_URL + "/insurances"; | ||
private static final String INSURANCE_APPLICATION_URL = BASE_URL + "/insurance-applications"; | ||
private static final String SURVEY_URL = BASE_URL + "/survey"; | ||
private static final String COMPENSATION_CLAIM = BASE_URL + "/compensation-claim"; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum ADMIN_URL { | ||
CUSTOMER_GRANT_AUTHORITY(CUSTOMER_URL + "/{id}/admin", GET.name()), | ||
CUSTOMER_ALL(CUSTOMER_URL + "/all", GET.name()), | ||
CUSTOMER_CONTRACT_MAINTENANCE(CUSTOMER_URL + "/contract-maintenance", GET.name()), | ||
INSURANCE_DESIGN(INSURANCE_URL + "/design", POST.name()), | ||
INSURANCE_REGISTER(INSURANCE_URL + "/{id}/register", POST.name()), | ||
INSURANCE_MODIFY(INSURANCE_URL + "/{id}", PUT.name()), | ||
INSURANCE_DELETE(INSURANCE_URL + "/{id}", DELETE.name()), | ||
SURVEY(SURVEY_URL + "/{ccid}", POST.name()), | ||
COMPENSATION_CLAIM_ALL(COMPENSATION_CLAIM + "/all", GET.name()), | ||
INSURANCE_APPLICATION(INSURANCE_APPLICATION_URL, GET.name()), | ||
INSURANCE_APPLICATION_APPROVAL(INSURANCE_APPLICATION_URL + "/{id}/approval", POST.name()), | ||
INSURANCE_APPLICATION_REJECTION(INSURANCE_APPLICATION_URL + "/{id}/rejection", POST.name()); | ||
|
||
private final String url; | ||
private final String method; | ||
} | ||
} |