-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Looking at the reasoning for its addition in the first place #2818, it seems to be necessitated by the inability to support multiple idP's.
As far as I can see, linking multiple ids to a single user was solved in #2366, which should (?) have made this command obsolete. But there is probably something that I am missing in this regard.
Why should it be reevaluated? Looking at the CLI implementation:
Lines 265 to 275 in 3f4ebbc
| "rename-user" | |
| (let [[_ old-userid new-userid] args] | |
| (if (not (and old-userid new-userid)) | |
| (do (usage) | |
| (System/exit 1)) | |
| (do (println "\n\n*** Renaming a user's identity can't easily be undone. ***\nType 'YES' to proceed or anything else to run a simulation only.") | |
| (let [simulate? (not= "YES" (read-line))] | |
| (println (if simulate? "Simulating only..." "Renaming...")) | |
| (mount/start #'rems.config/env #'rems.db.core/*db*) | |
| (rems.service.fix-userid/fix-all old-userid new-userid simulate?) | |
| (println "Finished.\n\nConsider rebooting the server process next to refresh all the caches, most importantly the application cache."))))) |
The following wording causes a bit of concern towards its implementation:
Renaming a user's identity can't easily be undone.
It seems to say that the very operation you are performing, cannot easily be done. I'm not sure how to parse this as an admin.
In the changelog, this feature is introduced as "experimental", but this is not visible in the CLI.
Line 275 in 3f4ebbc
| - There is a new experimental CLI command `rename-user` to handle the case where a single user's identity has changed. After running this command, one should also refresh the caches of the application server by restart. |
Its implications in /src/clj/rems/service/fix_userid.clj are quite far reaching, making it heavy to maintain.
The naming of the command rename-user seems more innocent than its semantics, you are not renaming a user, you are updating the user's internal identifier, with all the cascading effects of that operation.
Something along the lines of update-internal-user-identifier would probably be more fitting, but ideally its necessity should be made obsolete through other means, which I can see that you are aware of in #2818.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status