mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-23 16:31:46 +00:00
Merge branch 'issue-12754' into panel.sutty.nl
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
commit
97e8f2eb3f
2 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -21,4 +21,8 @@ class Rol < ApplicationRecord
|
|||
def usuarie?
|
||||
rol == USUARIE
|
||||
end
|
||||
|
||||
def self.role?(rol)
|
||||
ROLES.include? rol
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue