public CustomerPermission getContext(Class<?> type) {
String user = uriInfo.getQueryParameters().getFirst(CUSTOMER_ID);
if (user == null) {
return new SecurityManager.CustomerPermission("", SecurityManager.READ_ONLY);
}
CustomerPermission permission = sm.getPermission(user);
if (permission == null) {
return new SecurityManager.CustomerPermission(user, SecurityManager.READ_ONLY);
}
return permission;
}