[GeoNetwork-devel] Check permissions question

Hi

The ResourceLib denyAccess method is like:

public void denyAccess(ServiceContext context) throws Exception {
if (context.getUserSession().isAuthenticated()) {
throw new AccessDeniedException(“User is not permitted to access this resource”);
} else {
throw new OperationNotAllowedEx();
}
}

Anyone has an idea of this different exception depending if the user is logged or not?

For example, if an unlogged user tries to display a metadata that has no rights to see, gets OperationNotAllowedEx, but if the same user logs in and still has no rights to see the metadata then he gets AccessDeniedException.

Looks a bit strange this behaviour, but I guess is done for some good reason that I’m missing. If someone can provide some input would be great.

Thanks and regards,
Jose García


GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.


Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net