From 37511ad3e51a3e3be6efb3a0e05850ab38fbb831 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 28 Feb 2024 15:04:52 -0300 Subject: [PATCH] fix: generar un rol dentro del sitio (cherry picked from commit 670d6063e56922b3a8f8debdbd45fd823c34e38a) --- app/services/site_service.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/services/site_service.rb b/app/services/site_service.rb index 57a4ee59..d38a4e9a 100644 --- a/app/services/site_service.rb +++ b/app/services/site_service.rb @@ -13,7 +13,7 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do def create self.site = Site.new params - role = add_role temporal: false, rol: 'usuarie' + role = site.roles.build(usuarie: usuarie, temporal: false, rol: 'usuarie') site.deploys.build type: 'DeployLocal' # Los sitios de testing no se sincronizan sync_nodes unless site.name.end_with? '.testing' @@ -123,11 +123,6 @@ SiteService = Struct.new(:site, :usuarie, :params, keyword_init: true) do GitPushJob.perform_later(site) end - def add_role(temporal: true, rol: 'invitade') - site.roles << Rol.new(site: site, usuarie: usuarie, - temporal: temporal, rol: rol) - end - # Crea la licencia del sitio para cada locale disponible en el sitio # # @return [Boolean]