feat: add clickable user names and instance role display for staff/admin#8372
Open
LWS49 wants to merge 1 commit into
Open
feat: add clickable user names and instance role display for staff/admin#8372LWS49 wants to merge 1 commit into
LWS49 wants to merge 1 commit into
Conversation
bda2b64 to
62ae360
Compare
| def other_instances | ||
| tenant = current_tenant | ||
| ActsAsTenant.without_tenant { Instance.containing_user(@user) - [tenant] } | ||
| ActsAsTenant.without_tenant do |
Contributor
There was a problem hiding this comment.
You should be able to combine this with the one on line 12 to fetch all the instance_users tied to this user in one query.
62ae360 to
418d137
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Persona: staff and admin use these features to access admin student profiles, role requester profiles and learn about roles of users at each instance more easily.
To access admin student profiles directly, userId (rather than CourseUserId) must be propogated to the site. (needs to ensure that userId is only passed to the site for admin/staff to prevent students from seeing their own userId.) for role requester profiles, the userId of the requester is necessary. for roles of users at each instance, we now need both every instance the user is present in AND their role in each instance instead of only the instances.
3 and 4. userId only fetched if user is staff/admin. user name is clickable only if userId is fetched.
for role requester profiles, if fail to fetch, the name will be unclickable. (that should never happen? should an error be flagged if this happens? right now, the name will just be unclickable)
for instance role display, if instance role cannot be fetched, the display will be '-' instead.