Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAK-49670 Roster do not show student id if you dont have perm to view email #13396

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ottenhoff
Copy link
Contributor

@ottenhoff ottenhoff commented Mar 5, 2025

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:

  1. If a user has the roster.viewemail permission, they'll see both email addresses and usernames
  2. If a user doesn't have the roster.viewemail permission, both email addresses and usernames will be hidden

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.

@ottenhoff ottenhoff requested a review from adrianfish March 5, 2025 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant