void function ( ServiceContext arg0 , String arg1 , String arg2 ) { GeonetContext loc0 = ( GeonetContext ) arg0 . getHandlerContext ( Geonet . CONTEXT_NAME ) ; AccessManager loc1 = loc0 . getAccessManager ( ) ; Set loc2 = loc1 . getOperations ( arg0 , arg1 , arg0 . getIpAddress ( ) ) ; if ( ! loc2 . contains ( arg2 ) ) { denyAccess ( arg0 ) ; } }
check that the operation is allowed for current user . see accessmanager #getoperations servicecontext , string , string . concode_field_sep PlaceHolder placeHolder concode_field_sep String getMetadataDir concode_elem_sep String getMetadataDir concode_elem_sep String getRemovedDir concode_elem_sep String getRemovedDir concode_elem_sep String getRemovedDir concode_elem_sep void checkEditPrivilege concode_elem_sep String pad concode_elem_sep String getDataDir concode_elem_sep String getDir concode_elem_sep String getDir concode_elem_sep void denyAccess