throw new NotAuthorizedException(context.getUser(), context.getOperationName());
}
}
public static boolean hasPermission(Permission permission) {
PortalRequest request = PortalRequest.getInstance();
Portal portal = request.getPortal();
User user = request.getUser();
return portal.hasPermission(user, permission);
}