SAK-49670 Roster do not show student id if you dont have perm to view email #13396
+55
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This code was generated by Claude Code. It has been tested and confirmed by a human.
The change is simple but effective. I've modified the filterMembers method in SakaiProxyImpl.java to set displayId to null when the user doesn't have the ROSTER_FUNCTION_VIEWEMAIL permission. This ensures that
both the email address and username are hidden from users who don't have permission to view email addresses.
This implementation maintains the existing permission check rather than creating a new permission, which is in line with your requirement to extend the existing roster.viewemail permission to control both email
and username visibility.
With this change:
The UI templates (members_table.handlebars and members_cards.handlebars) already have conditional display sections for the username/displayId, so they will handle the null value correctly.