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

JENKINS-62443 Add Full Name lookup for SIDs #59

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

Conversation

skundrik
Copy link

A simple fix to add full name for SID. It looks like this
image

StringBuilder sb = new StringBuilder();
for (String sid: new TreeSet<>(sids)) {
try {
sr.loadUserByUsername(sid);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a large number of sids this looks like it can be potentially very slow (if it requires and LDAP lookup). Which IIUC will block the page from loading.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Also, this logi will lead to exceptions when handling group membership SIDs

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look at it again once #58 is done

@timja
Copy link
Member

timja commented May 26, 2020

I don’t think you need to keep the ID just show the full name of its set, have a look at what it looks like when you use the matrix authorization strategy from the matrix-auth plugin

@AbhyudayaSharma
Copy link
Member

If I recall correctly, Role Strategy and Matrix Auth load the full names asynchronously using JavaScript. That could keep the page load fast.

@skundrik I'm also working on a new UI in #58 . Maybe we can add this there later?

@res0nance
Copy link
Contributor

@skundrik
Copy link
Author

If I recall correctly, Role Strategy and Matrix Auth load the full names asynchronously using JavaScript. That could keep the page load fast.

@skundrik I'm also working on a new UI in #58 . Maybe we can add this there later?

Sure, it makes more sense. I guess I'll have to find something else to work on in the mean time.

@skundrik
Copy link
Author

I don’t think you need to keep the ID just show the full name of its set, have a look at what it looks like when you use the matrix authorization strategy from the matrix-auth plugin

I was wondering about that myself but It might be useful to have some reference to the actual SID in case you have identical full names.

@timja
Copy link
Member

timja commented May 27, 2020

I don’t think you need to keep the ID just show the full name of its set, have a look at what it looks like when you use the matrix authorization strategy from the matrix-auth plugin

I was wondering about that myself but It might be useful to have some reference to the actual SID in case you have identical full names.

best to be consistent here I think, it saves space and looks nicer,
matrix-auth doesn't show it, you could check the role-strategy plugin if you like to see what that does

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.

5 participants