@ SuppressWarnings ( "unchecked" ) protected String [ ] getUserRoles ( SOAPMessageContext context ) { HttpServletRequest request = ( HttpServletRequest ) context . get ( SOAPMessageContext . SERVLET_REQUEST ) ; Map < String , Set < String > > reqAttr = null ; reqAttr = ( Map < String , Set < String > > ) request . getAttribute ( "FEDORA_AUX_SUBJECT_ATTRIBUTES" ) ; if ( reqAttr == null ) { return null ; } Set < String > fedoraRoles = reqAttr . get ( "fedoraRole" ) ; if ( fedoraRoles == null || fedoraRoles . size ( ) == 0 ) { return null ; } String [ ] fedoraRole = fedoraRoles . toArray ( new String [ fedoraRoles . size ( ) ] ) ; return fedoraRole ; }
Returns the roles that the user has .