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

Admins wants to see usernames in the table of users #136

Closed
jedelbo opened this issue Sep 22, 2017 · 9 comments · Fixed by #380
Closed

Admins wants to see usernames in the table of users #136

jedelbo opened this issue Sep 22, 2017 · 9 comments · Fixed by #380
Milestone

Comments

@jedelbo
Copy link

jedelbo commented Sep 22, 2017

I use Realm Studio 0.0.1-alpha.8 and ROS 2.0.0-alpha.35.

When I browse the users, I am presented with long numbers in stead of names.
image

@cmelchior
Copy link
Contributor

cmelchior commented Sep 22, 2017

I just ran into this. This is highly annoying when debugging.

I guess it is difficult to choose what to show here if people are using custom auth, but the username from the Password/Username provider would be much more useful.

Perhaps add a selector to choose what is shown under ID?

@bigfish24
Copy link
Contributor

Yeah and we should store the username as metadata. I can update ROS to do this. In addition, we could just have logic to show usernames when the user has one vs the userId.

@cmelchior
Copy link
Contributor

cmelchior commented Sep 22, 2017

Having an Accounts section on the right side in the panel would probably also be useful. Similar to `metadata

@kraenhansen kraenhansen changed the title Usernames not shown Admins wants to see usernames in the table of users Oct 1, 2017
@bigfish24
Copy link
Contributor

@kraenhansen how do you plan to make this work?

@kraenhansen kraenhansen added this to the October 17th milestone Oct 9, 2017
@kraenhansen
Copy link
Member

@bigfish24 I am thinking about showing a comma separated list of the users accounts[].providerIds (most users would have only one) instead of the ROS user ID ... in the table cell.

And then on the user sidebar, these providerIds will be shown in the title (instead of the ROS id), but as a badge that the user can hover to see which provider the id relates to.
And then demote the ROS user ID to something secondary, smaller text underneath the list of account id badges.

Something like this:

skaermbillede 2017-10-09 kl 21 11 58

@bigfish24
Copy link
Contributor

Yeah this seems reasonable, but I would include the ProviderId and UserId in the table so it can be searched on.

ProviderId(s) UserId Role # Realms
af@realm.io 235072360327603285732 Administrator 2

Note to add the searching on ProviderId because realm-js doesn't support subquery you will need to search on Account then use backlinks to retrieve the list of User objects that match. This could make it hard to combine searching on UserId and ProviderId thoughts?

@kraenhansen
Copy link
Member

kraenhansen commented Oct 9, 2017

I think its a good idea to show both ids in the table. But since it's a table of users, wouldn't ID be better than UserId? The User-prefix feels redundant to me.

@bigfish24
Copy link
Contributor

bigfish24 commented Oct 9, 2017

@kraenhansen I think if you have both we should always use the terminology used elsewhere. When using custom auth you need to know the difference (though I guess we could argue for different naming everywhere). Currently, the userId is the stable ID used by ROS to identify a user, whereas the providerId is the external ID used to identify the ROS user. By default these are different in our implementations of auth providers, but you are free to actually have them the same with custom auth, assuming you can guarantee that the custom auth or providerId is unique and stable. We can't guarantee that with username/password since a username does not meet the requirements for a userId.

@kraenhansen
Copy link
Member

Ahh okay - I see. The User class indeed has a column named userId, then it makes sense to give it that name in the table too.
I would argue that the name in the class could just be id, but that will be for another issue :)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants