mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Story: #104525314 - relax permissions check for admin to allow removal of server... status values
This commit is contained in:
parent
db3e849c8a
commit
a114b8f599
1 changed files with 3 additions and 1 deletions
|
@ -109,7 +109,9 @@ class Domain < ActiveRecord::Base
|
|||
errors.add(:base, :invalid_auth_information_reserved)
|
||||
end
|
||||
|
||||
validate :check_permissions
|
||||
attr_accessor :is_admin
|
||||
|
||||
validate :check_permissions, :unless => :is_admin
|
||||
def check_permissions
|
||||
return unless force_delete?
|
||||
errors.add(:base, I18n.t(:object_status_prohibits_operation))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue