Revert "Use inflector rule to acronym Api to API"

This reverts commit 06f5eb10d4.
This commit is contained in:
Maciej Szlosarczyk 2018-07-24 12:53:51 +03:00
parent 90b2455032
commit aac76b333c
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
25 changed files with 43 additions and 44 deletions

View file

@ -10,7 +10,7 @@ class Ability
case @user.class.to_s
when 'AdminUser'
@user.roles&.each { |role| send(role) }
when 'APIUser'
when 'ApiUser'
@user.roles&.each { |role| send(role) }
when 'RegistrantUser'
static_registrant
@ -94,7 +94,7 @@ class Ability
can :manage, ContactVersion
can :manage, Billing::Price
can :manage, User
can :manage, APIUser
can :manage, ApiUser
can :manage, AdminUser
can :manage, Certificate
can :manage, Keyrelay

View file

@ -1,6 +1,6 @@
require 'open3'
class APIUser < User
class ApiUser < User
include EppErrors
def epp_code_map

View file

@ -34,7 +34,7 @@ module Versions
end
def user_from_id_role_username(str)
user = APIUser.find_by(id: $1) if str =~ /^(\d+)-(APIUser:|api-)/
user = ApiUser.find_by(id: $1) if str =~ /^(\d+)-(ApiUser:|api-)/
unless user.present?
user = AdminUser.find_by(id: $1) if str =~ /^(\d+)-AdminUser:/
unless user.present?

View file

@ -490,7 +490,7 @@ class Epp::Domain < Domain
def apply_pending_update!
preclean_pendings
user = APIUser.find(pending_json['current_user_id'])
user = ApiUser.find(pending_json['current_user_id'])
frame = Nokogiri::XML(pending_json['frame'])
self.statuses.delete(DomainStatus::PENDING_UPDATE)