Source:
<code><START> public List<RichMember> convertMembersToRichMembersWithAttributes(PerunSession sess, Group group, Resource resource, List<RichMember> richMembers, List<AttributeDefinition> attrsDef) throws InternalErrorException, MemberResourceMismatchException { <END> List<String> attrNames = new ArrayList<>(); for(AttributeDefinition attributeDefinition: attrsDef) { attrNames.add(attributeDefinition.getName()); } for (RichMember richMember: richMembers) { List<Attribute> userAttributes = new ArrayList<>(); List<Attribute> memberAttributes = new ArrayList<>(); List<Attribute> attributes = getPerunBl().getAttributesManagerBl().getAttributes(sess, group, resource, richMember, attrNames, true); for(Attribute attribute: attributes) { if(attribute.getName().startsWith(AttributesManager.NS_USER_ATTR)) userAttributes.add(attribute); else if(attribute.getName().startsWith(AttributesManager.NS_USER_FACILITY_ATTR)) userAttributes.add(attribute); else if(attribute.getName().startsWith(AttributesManager.NS_MEMBER_ATTR)) memberAttributes.add(attribute); else if(attribute.getName().startsWith(AttributesManager.NS_MEMBER_RESOURCE_ATTR)) memberAttributes.add(attribute); else if(attribute.getName().startsWith(AttributesManager.NS_MEMBER_GROUP_ATTR)) memberAttributes.add(attribute); else { throw new InternalErrorException(attribute + " is not from user or member namespace (member-resource, user-facility, member-group included)!"); } } richMember.setUserAttributes(userAttributes); richMember.setMemberAttributes(memberAttributes); } return richMembers; }</code><technical_language>add check Group-Resource</technical_language>

Target:
public List<RichMember> convertMembersToRichMembersWithAttributes(PerunSession sess, Group group, Resource resource, List<RichMember> richMembers, List<AttributeDefinition> attrsDef) throws InternalErrorException, MemberResourceMismatchException, GroupResourceMismatchException { List<String> attrNames = new ArrayList<>(); for(AttributeDefinition attributeDefinition: attrsDef) { attrNames.add(attributeDefinition.getName()); } for (RichMember richMember: richMembers) { List<Attribute> userAttributes = new ArrayList<>(); List<Attribute> memberAttributes = new ArrayList<>(); List<Attribute> attributes = getPerunBl().getAttributesManagerBl().getAttributes(sess, group, resource, richMember, attrNames, true); for(Attribute attribute: attributes) { if(attribute.getName().startsWith(AttributesManager.NS_USER_ATTR)) userAttributes.add(attribute); else if(attribute.getName().startsWith(AttributesManager.NS_USER_FACILITY_ATTR)) userAttributes.add(attribute); else if(attribute.getName().startsWith(AttributesManager.NS_MEMBER_ATTR)) memberAttributes.add(attribute); else if(attribute.getName().startsWith(AttributesManager.NS_MEMBER_RESOURCE_ATTR)) memberAttributes.add(attribute); else if(attribute.getName().startsWith(AttributesManager.NS_MEMBER_GROUP_ATTR)) memberAttributes.add(attribute); else { throw new InternalErrorException(attribute + " is not from user or member namespace (member-resource, user-facility, member-group included)!"); } } richMember.setUserAttributes(userAttributes); richMember.setMemberAttributes(memberAttributes); } return richMembers; }