Putting protection on some organisations, so that spammers have less access...
This commit is contained in:
parent
218cb67571
commit
b14eec0488
|
@ -6,8 +6,8 @@ class OrgasController < ApplicationController
|
||||||
before_action :set_mailer_host
|
before_action :set_mailer_host
|
||||||
before_action :authenticate_user!, only: [:edit, :update],
|
before_action :authenticate_user!, only: [:edit, :update],
|
||||||
unless: :check_secret
|
unless: :check_secret
|
||||||
before_action :authenticate_user!, only: [:validate, :accept, :cancel,
|
before_action :authenticate_user!, except: [:index, :new, :create, :show,
|
||||||
:destroy]
|
:edit, :update]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@search = apply_scopes(Orga).moderated.includes(:kind,
|
@search = apply_scopes(Orga).moderated.includes(:kind,
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
= link_to orga_path(orga, q: params[:q], page: params[:page]) do
|
= link_to orga_path(orga, q: params[:q], page: params[:page]) do
|
||||||
%em.fa.fa-eye
|
%em.fa.fa-eye
|
||||||
%td
|
%td
|
||||||
|
- if orga.secret.nil? || user_signed_in?
|
||||||
= link_to edit_orga_path orga do
|
= link_to edit_orga_path orga do
|
||||||
%em.fa.fa-pencil
|
%em.fa.fa-pencil
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
%em.fa.fa-li.fa-dot-circle-o
|
%em.fa.fa-li.fa-dot-circle-o
|
||||||
GeoJSON
|
GeoJSON
|
||||||
|
|
||||||
|
- if @orga.secret.nil? || user_signed_in?
|
||||||
%h1
|
%h1
|
||||||
%em.fa.fa-wrench
|
%em.fa.fa-wrench
|
||||||
= t '.actions'
|
= t '.actions'
|
||||||
|
|
Loading…
Reference in New Issue