@ Override public boolean hasPermission ( User user , E userGroup , Permission permission ) { // always grant READ access to groups in which the user itself is a member if ( user != null && permission . equals ( Permission . READ ) && userGroup . getMembers ( ) . contains ( user ) ) { LOG . trace ( "Granting READ access on group where the user is member." ) ; return true ; } // call parent implementation return super . hasPermission ( user , userGroup , permission ) ; }
Grants READ permission on groups where the user is a member . Uses default implementation otherwise .