From fc55f7cfa3983f471115d2694ec010c1319d32cc Mon Sep 17 00:00:00 2001 From: Javier Torres Date: Thu, 30 Mar 2017 18:48:41 +0200 Subject: [PATCH] Avoid circular dependencies in UserCreation <-> UserCreatedEvent --- .../lib/carto_gears_api/events/user_events.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gears/carto_gears_api/lib/carto_gears_api/events/user_events.rb b/gears/carto_gears_api/lib/carto_gears_api/events/user_events.rb index c4f4726c6c..fca3da0d53 100644 --- a/gears/carto_gears_api/lib/carto_gears_api/events/user_events.rb +++ b/gears/carto_gears_api/lib/carto_gears_api/events/user_events.rb @@ -1,6 +1,5 @@ require_dependency 'carto_gears_api/events/base_event' require_dependency 'carto_gears_api/users/user' -require_dependency 'carto/user_creation' module CartoGearsApi module Events @@ -9,15 +8,15 @@ module CartoGearsApi # @attr_reader [Users::User] user user which was created class UserCreationEvent < BaseEvent # User created via login in with SAML SSO - CREATED_VIA_SAML = Carto::UserCreation::CREATED_VIA_SAML + CREATED_VIA_SAML = 'saml'.freeze # User created via login with LDAP credentials - CREATED_VIA_LDAP = Carto::UserCreation::CREATED_VIA_LDAP + CREATED_VIA_LDAP = 'ldap'.freeze # User created via signup up to the org - CREATED_VIA_ORG_SIGNUP = Carto::UserCreation::CREATED_VIA_ORG_SIGNUP + CREATED_VIA_ORG_SIGNUP = 'org_signup'.freeze # User created via enterprise user management API (EUMAPI) - CREATED_VIA_API = Carto::UserCreation::CREATED_VIA_API + CREATED_VIA_API = 'api'.freeze # User created via HTTP header authentication - CREATED_VIA_HTTP_AUTENTICATION = Carto::UserCreation::CREATED_VIA_HTTP_AUTENTICATION + CREATED_VIA_HTTP_AUTENTICATION = 'http_authentication'.freeze # User created by organization administrator CREATED_VIA_ORG_ADMIN = 'org_admin'.freeze # User created by superadmin