roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

Make it possible for super admins to look for users ID

Open magdalenadrafiova opened this issue 4 years ago • 21 comments

@briri @raycarrick Currently we can look for name, email address or admins. It would be useful to add an extra column where we would add the user ID, so we can do a quick search Screenshot 2021-08-12 at 10 43 38

magdalenadrafiova avatar Aug 12 '21 09:08 magdalenadrafiova

One way to address this would be to say "if someone puts in a number and nothing else and they are super admin (and possibly org admin?) then treat it as a user id" that might work. We have something similar already in there I think.

raycarrick-ed avatar Aug 13 '21 09:08 raycarrick-ed

I am starting this.

johnpinto1 avatar May 06 '22 08:05 johnpinto1

@raycarrick-ed & @briri I am finding it a bit difficult to know how to get the User scope :search to differentiate between year 2000+ and user ids in that range. Any suggestions. I also only want super admins to be able to search by user id.

https://github.com/DMPRoadmap/roadmap/blob/1d09e1d530b63290bc9d6fd6ca108d274cce4836/app/models/user.rb#L137-L158

johnpinto1 avatar May 09 '22 11:05 johnpinto1

If this is just something a super admin wants to do, could they not just manipulate the URL in the browser?

briri avatar May 09 '22 14:05 briri

@briri Please can you give example of URL?

johnpinto1 avatar May 09 '22 14:05 johnpinto1

https://dmponline.dcc.ac.uk/super_admin/users/643/edit

briri avatar May 09 '22 15:05 briri

@raycarrick-ed @dsisu I think @briri solution is the best. Super admins can access user details given the user Id by appending HOST_URL/super_admin/users/PUT_USER_ID_HERE/edit e,g., HOST_URL = https://dmponline.dcc.ac.uk & https://dmponline.dcc.ac.uk/super_admin/users/643/edit This information should be added Wiki Super Admins.

I am going to assume this is sorted.

johnpinto1 avatar May 10 '22 08:05 johnpinto1

I think this is fine in the meantime but at some point we will almost certainly want to implement some sort of search grammar. But not right now e.g.

surname ~ 'ike' && created < '2005-01-01' && org.name ~ 'Nat.*Phys.*Council'

Just adding here as a memento.

raycarrick-ed avatar May 10 '22 09:05 raycarrick-ed

@dsisu, @raycarrick-ed & @briri I have added a comment as suggested by @raycarrick-ed to https://github.com/DigitalCurationCentre/DMPonline-Service/wiki/Help-for-super-admins Selection_036 Please edit to improve.

johnpinto1 avatar May 10 '22 09:05 johnpinto1

agree with @raycarrick-ed that we need something better long term. We might want to revisit the paginable concern and perhaps introduce a mechanism that provides search + faceting

briri avatar May 10 '22 14:05 briri

Can we please clarify what is wanted here at interface level. We want to be able to enter user ID (?) in the search box in the Users window, https://dmponline.dcc.ac.uk/org/admin/users/admin_index . Is this correct?

What do we mean by 'adding the extra column'? Is it adding an 'User ID' column in the table that displays users (the table beneath the search box).

dsisu avatar May 10 '22 14:05 dsisu

@dsisu We canot do a search by entering user_id in search box. Only way to get the user is to add id in url say 3456 using link https://dmponline.dcc.ac.uk/super_admin/users/3456/edit

johnpinto1 avatar May 10 '22 14:05 johnpinto1

@johnpinto1 I know that. What I am asking is, what feature are we trying to do with this issue, what do we mean by 'Make it possible for super admins to look for users ID'? Look for suggests a 'search'.

dsisu avatar May 10 '22 14:05 dsisu

@dsisu It can't be done that way as the search will not allow it. See the comments above. So if you know the id you can see if it exists using the link if you are a super admin.

johnpinto1 avatar May 10 '22 14:05 johnpinto1

@johnpinto1 I see the comments and I can see you can't search by ID (I've already tried it). What I'm asking is, is that what Magdalena was trying to get to in the first place? It's not clear from the way the issue is worded.

dsisu avatar May 10 '22 15:05 dsisu

She wanted to be able to use the search box.

johnpinto1 avatar May 10 '22 15:05 johnpinto1

The workaround is equivalent to a search as it finds the user by Id if user exists.

johnpinto1 avatar May 10 '22 15:05 johnpinto1

The workaround is equivalent to a search as it finds the user by Id if user exists.

Yes, but it's not user friendly. Even if they are super-admin users, chances are they are not using the system every day and they won't remember that they have to use a specific URL.

dsisu avatar May 10 '22 15:05 dsisu

That is why it is in the notes if they want to find a user quickly.

johnpinto1 avatar May 10 '22 15:05 johnpinto1

As a summary for the future ... we thought we would allow people to put a user id into the search box to look up a user by id. We expected this to be trivial (if number then it's an id otherwise do the usual search). But it turned out to be more complicated because we are already doing that with numbers in the search box. So we are parking this and, in the meantime, there is a workaround documented on the DCC superadmins page.

We will revisit this in the future and probably need to rethink how the search is done.

raycarrick-ed avatar May 11 '22 09:05 raycarrick-ed

Move to backlog as the fix is too big to be worth the time at the moment

pherterich avatar May 11 '22 15:05 pherterich