Merge pull request #1015 from consul/investment-project-show
adds permissions for everyone to see investment projects
This commit is contained in:
@@ -5,7 +5,6 @@ class SpendingProposalsController < ApplicationController
|
||||
|
||||
load_and_authorize_resource
|
||||
|
||||
before_action :verify_access, only: [:show]
|
||||
before_filter -> { flash.now[:notice] = flash[:notice].html_safe if flash[:html_safe] && flash[:notice] }
|
||||
|
||||
feature_flag :spending_proposals
|
||||
@@ -41,8 +40,4 @@ class SpendingProposalsController < ApplicationController
|
||||
params.require(:spending_proposal).permit(:title, :description, :external_url, :geozone_id, :association_name, :terms_of_service, :captcha, :captcha_key)
|
||||
end
|
||||
|
||||
def verify_access
|
||||
raise CanCan::AccessDenied unless current_user.try(:valuator?) || current_user.try(:administrator?) || @spending_proposal.author == current_user
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user