public boolean hasPanelAccess ( Panel panel , User user , DelfoiActionName actionName ) { if ( panel == null ) { logger . warn ( "Panel was null when checking panel access" ) ; return false ; } if ( user == null ) { logger . warn ( "User was null when checking panel access" ) ; return false ; } if ( isSuperUser ( user ) ) { return true ; } UserRole userRole = getPanelRole ( user , panel ) ; if ( userRole == null ) { return false ; } DelfoiAction action = delfoiActionDAO . findByActionName ( actionName . toString ( ) ) ; if ( action == null ) { logger . info ( String . format ( "ActionUtils.hasDelfoiAccess - undefined action: '%s'" , actionName ) ) ; return false ; } return hasPanelAccess ( panel , action , userRole ) ; }
Returns whether user has required panel action access