mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-01-05 00:06:24 +01:00
44 lines
1.0 KiB
Java
44 lines
1.0 KiB
Java
package stirling.software.SPDF.model;
|
|
public enum Role {
|
|
|
|
// Unlimited access
|
|
ADMIN("ROLE_ADMIN", Integer.MAX_VALUE, Integer.MAX_VALUE),
|
|
|
|
// Unlimited access
|
|
USER("ROLE_USER", Integer.MAX_VALUE, Integer.MAX_VALUE),
|
|
|
|
// 40 API calls Per Day, 40 web calls
|
|
LIMITED_API_USER("ROLE_LIMITED_API_USER", 40, 40),
|
|
|
|
// 20 API calls Per Day, 20 web calls
|
|
EXTRA_LIMITED_API_USER("ROLE_EXTRA_LIMITED_API_USER", 20, 20),
|
|
|
|
// 0 API calls per day and 20 web calls
|
|
WEB_ONLY_USER("ROLE_WEB_ONLY_USER", 0, 20);
|
|
|
|
private final String roleId;
|
|
private final int apiCallsPerDay;
|
|
private final int webCallsPerDay;
|
|
|
|
Role(String roleId, int apiCallsPerDay, int webCallsPerDay) {
|
|
this.roleId = roleId;
|
|
this.apiCallsPerDay = apiCallsPerDay;
|
|
this.webCallsPerDay = webCallsPerDay;
|
|
}
|
|
|
|
public String getRoleId() {
|
|
return roleId;
|
|
}
|
|
|
|
public int getApiCallsPerDay() {
|
|
return apiCallsPerDay;
|
|
}
|
|
|
|
public int getWebCallsPerDay() {
|
|
return webCallsPerDay;
|
|
}
|
|
|
|
|
|
|
|
}
|