Putting protection on some organisations, so that spammers have less access...

This commit is contained in:
echarp 2016-01-26 15:09:33 +01:00
parent 218cb67571
commit b14eec0488
3 changed files with 17 additions and 15 deletions

View File

@ -6,8 +6,8 @@ class OrgasController < ApplicationController
before_action :set_mailer_host
before_action :authenticate_user!, only: [:edit, :update],
unless: :check_secret
before_action :authenticate_user!, only: [:validate, :accept, :cancel,
:destroy]
before_action :authenticate_user!, except: [:index, :new, :create, :show,
:edit, :update]
def index
@search = apply_scopes(Orga).moderated.includes(:kind,

View File

@ -58,6 +58,7 @@
= link_to orga_path(orga, q: params[:q], page: params[:page]) do
%em.fa.fa-eye
%td
- if orga.secret.nil? || user_signed_in?
= link_to edit_orga_path orga do
%em.fa.fa-pencil

View File

@ -44,6 +44,7 @@
%em.fa.fa-li.fa-dot-circle-o
GeoJSON
- if @orga.secret.nil? || user_signed_in?
%h1
%em.fa.fa-wrench
= t '.actions'