Skip to content

Commit

Permalink
Can only see approved organisations
Browse files Browse the repository at this point in the history
  • Loading branch information
MacTwister committed Aug 1, 2024
1 parent d17f0be commit b1f0a43
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/organizations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ def update

def find_organization
@organization = Organization.friendly.find(params[:id])

unless @organization.workflow_state == "approved" || (current_user && (current_user.has_role?(:superadmin) || @organization.creator == current_user))
error_not_found
end

end

def organization_params
Expand Down

0 comments on commit b1f0a43

Please sign in to comment.