Skip to content

Commit

Permalink
SAK-31393 Students are allow to see members of other sections in rost…
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjmerono authored Jun 22, 2016
1 parent de8ac20 commit 2cc3776
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -532,13 +532,13 @@ private List<RosterMember> filterHiddenMembers(List<RosterMember> members,
for (RosterMember member : members) {
String userId = member.getUserId();

// skip if privacy restricted and not the current user
if (!userId.equals(currentUserId) && (viewHidden || hiddenUserIds.contains(userId)) && authzGroup.getMember(userId) == null) {
// skip if not the current user and privacy restricted or user not in group
if (!userId.equals(currentUserId) && ((!viewHidden && hiddenUserIds.contains(userId)) || authzGroup.getMember(userId) == null)) {
continue;
}

// now filter out users based on their role
if (filterRoles && !viewHidden) {
if (filterRoles) {
String memberRoleId = member.getRole();
if (ArrayUtils.contains(visibleRoles, memberRoleId)){
filtered.add(member);
Expand Down

0 comments on commit 2cc3776

Please sign in to comment.