public List < Preference > getEditableUserAttributes ( IPerson currentUser ) { EntityIdentifier ei = currentUser . getEntityIdentifier ( ) ; IAuthorizationPrincipal ap = AuthorizationServiceFacade . instance ( ) . newPrincipal ( ei . getKey ( ) , ei . getType ( ) ) ; List < Preference > allowedAttributes = new ArrayList < Preference > ( ) ; for ( Preference attr : accountEditAttributes ) { if ( ap . hasPermission ( "UP_USERS" , "EDIT_USER_ATTRIBUTE" , attr . getName ( ) ) ) { allowedAttributes . add ( attr ) ; } } return allowedAttributes ; }
Returns the collection of attributes that the specified currentUser can edit .