[Fix] Fixed bad inspector privilege check
This commit is contained in:
parent
68a13d0e77
commit
589f251aa2
|
@ -87,6 +87,8 @@ public class StrolchConstants extends StrolchModelConstants {
|
|||
public static final String PRIVILEGE_SET_USER_STATE = PrivilegeHandler.PRIVILEGE_SET_USER_STATE;
|
||||
public static final String PRIVILEGE_SET_USER_PASSWORD = PrivilegeHandler.PRIVILEGE_SET_USER_PASSWORD;
|
||||
|
||||
public static final String PRIVILEGE_INSPECTOR = "Inspector";
|
||||
|
||||
public static final String PRIVILEGE_INVALIDATE_SESSION = "InvalidateSession";
|
||||
public static final String PRIVILEGE_GET_SESSION = "GetSession";
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ import static li.strolch.rest.StrolchRestfulConstants.MSG;
|
|||
import static li.strolch.rest.StrolchRestfulConstants.STROLCH_CERTIFICATE;
|
||||
import static li.strolch.rest.helper.ResponseUtil.toResponse;
|
||||
import static li.strolch.rest.helper.RestfulHelper.toJson;
|
||||
import static li.strolch.runtime.StrolchConstants.StrolchPrivilegeConstants.PRIVILEGE_INSPECTOR;
|
||||
import static li.strolch.search.SearchBuilder.orderBy;
|
||||
import static li.strolch.utils.helper.ExceptionHelper.getCallerMethod;
|
||||
import static li.strolch.utils.helper.ExceptionHelper.getCallerMethodNoClass;
|
||||
|
@ -93,7 +94,7 @@ public class InspectorResource {
|
|||
private static Certificate validateCertificate(HttpServletRequest request) {
|
||||
Certificate cert = (Certificate) request.getAttribute(STROLCH_CERTIFICATE);
|
||||
RestfulStrolchComponent rest = RestfulStrolchComponent.getInstance();
|
||||
rest.validate(cert).validateAction(InspectorResource.class.getSimpleName(), getCallerMethodNoClass(2));
|
||||
rest.validate(cert).validateAction(PRIVILEGE_INSPECTOR, getCallerMethodNoClass(2));
|
||||
return cert;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue