Only a moderator can delete an organisation
This commit is contained in:
parent
c994947f22
commit
0b3db18477
@ -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]
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user