mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-14 23:31:41 +00:00
si ya se aceptó la invitación volver al panel
This commit is contained in:
parent
3516d910b2
commit
4cb66ca9dc
1 changed files with 7 additions and 0 deletions
|
@ -104,6 +104,13 @@ class UsuariesController < ApplicationController
|
|||
# Aceptar la invitación
|
||||
def accept_invitation
|
||||
@site = find_site
|
||||
|
||||
# Le usuarie ya aceptó la invitación
|
||||
if site.usuarie?(current_usuarie) || site.invitade?(current_usuarie)
|
||||
redirect_to sites_path
|
||||
return
|
||||
end
|
||||
|
||||
authorize SiteUsuarie.new(@site, current_usuarie)
|
||||
|
||||
@site.touch if current_usuarie.rol_for_site(@site).update_attribute :temporal, false
|
||||
|
|
Loading…
Reference in a new issue