mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 18:41:42 +00:00
fix: generar un rol dentro del sitio
(cherry picked from commit 670d6063e5
)
This commit is contained in:
parent
d0bd90ab4e
commit
37511ad3e5
1 changed files with 1 additions and 6 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue