-
Notifications
You must be signed in to change notification settings - Fork 57
Auto expiration for users #557
Comments
I've heard reports as an ST that NetID/VPN access lasts at least three years, so, it's a while sans Bursar. Thought: in the admin or maybe superuser mode, allow said user to select all users of a given affiliation (e.g. "YC TC 2013") and mark them as banned. We could allow searching by partial matching (e.g. "2013"), so for Yale you wouldn't have to go through each of the college and school affiliations for a given year. If we wanted to get super-fancy we could display the matching users in a table, with check boxes ("check all / none"), so exceptions could be made for e.g. continuing employees. I suggest this as opposed to a regular cron job or reservation-time check, because (1) other organizations will have different expiration times than us, and (2) the vast majority of patrons will not be trying to check out equipment post-graduation and I do not think it would be wise to query the database on every login or reservation-attempt, just to check if the user should be auto-banned. |
Oh, true, patrons can definitely edit their own affiliation. We would however encounter this problem, regardless of the implementation (how else would we automatically determine year and eligibility?). I'm not too keen to prevent users from editing their own affiliation, either, but if we're okay doing that, I guess we're okay doing that to patrons. :-/ |
On |
There's an edit button on the bottom of your user page in the patron view; no need for URL hacks. :-) |
I agree with David's solution. We should be able to pull class year and affiliation from LDAP (they're separate fields, so we wouldn't need to do any string searching really), and make those fields un-editable by users. Then we should:
It might be useful to add an option in app config to let admins turn on some kind of reminder feature set to a date of their choice, so that every year when they sign in say, on Commencement, they'll be reminded to "ban" all graduating seniors. Although in the future we might want to add a "Graduated" attribute, if only for semantics. (Imagine if a user tries to come in, and their profile is marked Banned - are they Banned because they abused the equipment, or are they Banned because they graduated? Those are two very different use cases that would affect how they would be seen at the front desk. So even though they'd have essentially the same business logic, I think it'd be semantically useful to distinguish between Banned and Graduated users.) |
I'm hesitant to establishing another reliance on LDAP, an open standard but one which we shouldn't expect everyone to use, for whenever we finally implement non-CAS login in #2. If we're comfortable requiring LDAP for this feature, yes, a 'quick' series of queries should be easy, although I think keeping it within Reservation's database is probably the better track. I really like the idea of a sortable/filterable table with checkboxes, and for admin-reminders. The differentiation for Banned/Graduated users seems a justified one. My only reservation is introducing a very school-centered term ("graduated") to a general purpose application. Perhaps we can hash out some sort of compromise term in #553. :-) |
Could we use the string search functionality that we have implemented on most of the model index pages? (User affiliation should show up on the index page anyway).
This seems fairly doable, doesn't use LDAP, and also automatically allows batch filtering based on any attribute (or part of an attribute). The only issue is if a user is cross-referenced in search (eg, if an admin filters by '12' and someone's netID has a '12' in it). This really wouldn't be a major issue (because of the unliklihood of this happening, esp. with larger search terms like '2012') but if there's an easy way to restrict the filter by data column, then hey, problem solved. |
That route should be doable through adding another two columns to the datatable, for one for the checkbox and another for affiliation. The admin would have to be clever enough to up the number of viewable users per page (datatables is paginated), and might have to perform the action multiple times if there are more than 100 matching users (we could alternately provide an option for displaying 500 or 1000.. I think the current options are hard-coded), but that is on the whole a minor inconvenience relative to deactivating users one at a time. |
Note that this can currently be handled by importing a list of expiring users by username (either CAS or e-mail), selecting "Update existing", and selecting the "Banned" role. It's not great and might end up creating unused banned users if LDAP is enabled, but is better than nothing. We should eventually try and implement this, though. |
Ok, after some further thought, I think that we should actually reserve the ActiveAdmin interface for this. Technically we could easily add an "expiration date" to users and a rake task to ban them after that date, but it would be unwieldy to set through our current interface and we definitely shouldn't be tying this to any kind of LDAP status. The truth is, our current solution of:
isn't too far from what we're trying to accomplish. I would say we can merge this into #1063, set up a custom search to pull all users with an affiliation match to some query string and ban them. More generally, we'd be setting up a way to search for and add users to a batch, and then have a set of actions that can be performed on those users (requirements, status, etc). I'm closing this issue and will comment in #1063 with a summary of the plan for this request. |
From Chris:
A feature that auto-banned users would be cool, I guess. How long do seniors keep their netIDs for, though?
The text was updated successfully, but these errors were encountered: