From 78a0c8a64f4c374916dc9e785df9b37d604e6a67 Mon Sep 17 00:00:00 2001 From: Collin Brittle Date: Fri, 4 Nov 2016 15:51:40 +0000 Subject: [PATCH] Fixes issue creating admins The uid is the PID, not the email. --- lib/tasks/datarepo.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/datarepo.rake b/lib/tasks/datarepo.rake index 62c34d7..2676ef3 100644 --- a/lib/tasks/datarepo.rake +++ b/lib/tasks/datarepo.rake @@ -58,7 +58,7 @@ namespace :datarepo do user = User.find_by({email: email}) if user.nil? - user = User.new(email: email, uid: email, provider: 'cas') + user = User.new(email: email, uid: email.split('@')[0], provider: 'cas') end user.roles << admin_role