Bug #6412

Admin cannot use UserFilesController#reprocess unless admin account is marked "enrolled"

Added by Tom Clegg over 6 years ago. Updated over 6 years ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
Improvements for admins
Target version:
-
Start date:
06/24/2015
Due date:
% Done:

0%

Estimated time:
Story points:
0.5

History

#1 Updated by Tom Clegg over 6 years ago

The before-filters in UserFilesController (and probably elsewhere) are meant to prevent participants from performing actions when not enrolled, active, etc. However, some of the same actions are available to admins (like "reprocess someone's uploaded data"), and the before filters check the status of the admin's account instead of either [a] checking the relevant participant's account or [b] just allowing admins to perform such actions regardless of the participant's state, which is the general approach to admin permissions. In any case the functionality shouldn't depend on admins having "enrolled" status because admins shouldn't be enrolled (even though the "test account" flag does prevent admins from showing up in participant lists regardless of the "enrolled" status).

Workaround:

rails console
u = User.find(1234567)         # get from location bar when showing the right user
u.hex = u.send 'make_hex_code'
u.enrolled = Time.now
u.save

Also available in: Atom PDF