diff --git a/app/controllers/orgas_controller.rb b/app/controllers/orgas_controller.rb index 96ee76f1..dff9d250 100644 --- a/app/controllers/orgas_controller.rb +++ b/app/controllers/orgas_controller.rb @@ -2,9 +2,10 @@ class OrgasController < ApplicationController before_action :set_orga, except: [:index, :new, :create] before_action :set_mailer_host - before_action :authenticate_user!, only: [:edit, :update, :cancel, :destroy], + before_action :authenticate_user!, only: [:edit, :update], unless: :check_secret - before_action :authenticate_user!, only: [:validate, :accept] + before_action :authenticate_user!, only: [:validate, :accept, :cancel, + :destroy] def index @search = Orga.moderated.includes(:kind).includes(:region).search params[:q] diff --git a/app/views/orgas/show.html.haml b/app/views/orgas/show.html.haml index 85c95ece..858c38a7 100644 --- a/app/views/orgas/show.html.haml +++ b/app/views/orgas/show.html.haml @@ -51,10 +51,11 @@ = link_to edit_orga_path @orga do %em.fa.fa-lg.fa-pencil = t '.edit' - %h2 - = link_to cancel_orga_path @orga do - %em.fa.fa-lg.fa-thumbs-down - = t '.cancel' + - if user_signed_in? + %h2 + = link_to cancel_orga_path @orga do + %em.fa.fa-lg.fa-thumbs-down + = t '.cancel' %h3= t '.description' .description