From 3f0d369c631c2eb0aa66c41156183ffb7aa22e96 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 24 Aug 2019 08:37:14 +0200 Subject: [PATCH] allow password reset for admin account. datacite/datacite#832 --- app/models/ability.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/ability.rb b/app/models/ability.rb index bef754066..f40f1371b 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -105,6 +105,7 @@ def initialize(user) activity.doi.findable? end elsif user.role_id == "temporary" + can [:read, :update], Provider, :symbol => "ADMIN" if user.uid == "admin" can [:read, :update], Provider, :symbol => user.provider_id.upcase if user.provider_id.present? can [:read, :update], Client, :symbol => user.client_id.upcase if user.client_id.present? can [:read], Doi, :client_id => user.client_id if user.client_id.present?