5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 07:16:21 +00:00

fix: establecer un parámetro por defecto #12754

This commit is contained in:
f 2023-03-23 17:21:05 -03:00
parent 75c4d3264d
commit fda1e5b78c
2 changed files with 6 additions and 0 deletions

View file

@ -72,6 +72,8 @@ class UsuariesController < ApplicationController
site_usuarie = SiteUsuarie.new(@site, current_usuarie)
authorize site_usuarie
params[:invited_as] = Rol::INVITADE unless Rol.role? params[:invited_as]
@policy = policy(site_usuarie)
end

View file

@ -21,4 +21,8 @@ class Rol < ApplicationRecord
def usuarie?
rol == USUARIE
end
def self.role?(rol)
ROLES.include? rol
end
end