boolean checkAccessTopicFromController ( UserContext ctx , String topic , JsTopicAccessController jsTopicAccessController ) throws IllegalAccessException { logger . debug ( "Looking for accessController for topic '{}' from JsTopicAccessController {}" , topic , jsTopicAccessController ) ; JsTopicControls jsTopicControls = jsTopicControlsTools . getJsTopicControlsFromProxyClass ( jsTopicAccessController . getClass ( ) ) ; logger . debug ( "Looking for accessController for topic '{}' from jsTopicControls {}" , topic , jsTopicControls ) ; if ( null != jsTopicControls ) { logger . debug ( "Looking for accessController for topic '{}' from jsTopicControls {}, {}" , topic , jsTopicControls , jsTopicControls . value ( ) ) ; for ( JsTopicControl jsTopicControl : jsTopicControls . value ( ) ) { if ( topic . equals ( jsTopicControl . value ( ) ) ) { logger . debug ( "Found accessController for topic '{}' from JsTopicControls annotation" , topic ) ; checkAccessTopicFromControllers ( ctx , topic , Arrays . asList ( jsTopicAccessController ) ) ; return true ; } } } return false ; }
Check if specific access control is allowed from controller