Source:
<code>public List<Attribute> getRequiredAttributes(PerunSession sess, Member member, Group group, boolean workWithUserAttributes) throws PrivilegeException, InternalErrorException, MemberNotExistsException, GroupNotExistsException, WrongAttributeAssignmentException { Utils.checkPerunSession(sess); getPerunBl().getMembersManagerBl().checkMemberExists(sess, member); getPerunBl().getGroupsManagerBl().checkGroupExists(sess, group); List<Attribute> attributes = getAttributesManagerBl().getRequiredAttributes(sess, member, group, workWithUserAttributes); Iterator<Attribute> attrIter = attributes.iterator(); <START> User u = null; <END> while(attrIter.hasNext()) { Attribute attrNext = attrIter.next(); if (getAttributesManagerBl().isFromNamespace(sess, attrNext, NS_MEMBER_ATTR)){ if(!AuthzResolver.isAuthorizedForAttribute(sess, ActionType.READ, attrNext, member, null)) attrIter.remove(); else attrNext.setWritable(AuthzResolver.isAuthorizedForAttribute(sess, ActionType.WRITE, attrNext, member, null)); } else if (getAttributesManagerBl().isFromNamespace(sess, attrNext, NS_USER_ATTR)) { if (u == null) u = getPerunBl().getUsersManagerBl().getUserByMember(sess, member); if(!AuthzResolver.isAuthorizedForAttribute(sess, ActionType.READ, attrNext, u, null)) attrIter.remove(); else attrNext.setWritable(AuthzResolver.isAuthorizedForAttribute(sess, ActionType.WRITE, attrNext, u, null)); } else if (getAttributesManagerBl().isFromNamespace(sess, attrNext, NS_MEMBER_GROUP_ATTR)) { if(!AuthzResolver.isAuthorizedForAttribute(sess, ActionType.READ, attrNext, member, group)) attrIter.remove(); else attrNext.setWritable(AuthzResolver.isAuthorizedForAttribute(sess, ActionType.WRITE, attrNext, member, group)); } else { throw new ConsistencyErrorException("There is some attribute which is not type of any possible choice."); } } return attributes; }</code><technical_language>Please full name of variable "user" instead of "u" working this object. please call this place always. is calling of method getUserByMember more human readable</technical_language>

Target:
public List<Attribute> getRequiredAttributes(PerunSession sess, Member member, Group group, boolean workWithUserAttributes) throws PrivilegeException, InternalErrorException, MemberNotExistsException, GroupNotExistsException, WrongAttributeAssignmentException { Utils.checkPerunSession(sess); getPerunBl().getMembersManagerBl().checkMemberExists(sess, member); getPerunBl().getGroupsManagerBl().checkGroupExists(sess, group); List<Attribute> attributes = getAttributesManagerBl().getRequiredAttributes(sess, member, group, workWithUserAttributes); Iterator<Attribute> attrIter = attributes.iterator(); User user = null; while(attrIter.hasNext()) { Attribute attrNext = attrIter.next(); if (getAttributesManagerBl().isFromNamespace(sess, attrNext, NS_MEMBER_ATTR)){ if(!AuthzResolver.isAuthorizedForAttribute(sess, ActionType.READ, attrNext, member, null)) attrIter.remove(); else attrNext.setWritable(AuthzResolver.isAuthorizedForAttribute(sess, ActionType.WRITE, attrNext, member, null)); } else if (getAttributesManagerBl().isFromNamespace(sess, attrNext, NS_USER_ATTR)) { if (user == null) user = getPerunBl().getUsersManagerBl().getUserByMember(sess, member); if(!AuthzResolver.isAuthorizedForAttribute(sess, ActionType.READ, attrNext, user, null)) attrIter.remove(); else attrNext.setWritable(AuthzResolver.isAuthorizedForAttribute(sess, ActionType.WRITE, attrNext, user, null)); } else if (getAttributesManagerBl().isFromNamespace(sess, attrNext, NS_MEMBER_GROUP_ATTR)) { if(!AuthzResolver.isAuthorizedForAttribute(sess, ActionType.READ, attrNext, member, group)) attrIter.remove(); else attrNext.setWritable(AuthzResolver.isAuthorizedForAttribute(sess, ActionType.WRITE, attrNext, member, group)); } else { throw new ConsistencyErrorException("There is some attribute which is not type of any possible choice."); } } return attributes; }