@ Override public List < String > getUsers ( String name ) { if ( ! hasRole ( name ) ) { throw new Error ( "error: name does not exist" ) ; } List < String > names = new ArrayList <> ( ) ; for ( Role role : allRoles . values ( ) ) { if ( role . hasDirectRole ( name ) ) { names . add ( role . name ) ; } } return names ; }
getUsers gets the users that inherits a subject . domain is an unreferenced parameter here may be used in other implementations .