Skip to content

Commit

Permalink
api perms review - organizations
Browse files Browse the repository at this point in the history
  • Loading branch information
lzap committed Jan 11, 2012
1 parent d9dce94 commit 469ba52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/controllers/api/organizations_controller.rb
Expand Up @@ -58,6 +58,8 @@ def destroy
render :text => _("Deleted organization '#{params[:id]}'"), :status => 200
end

private

def find_organization
@organization = Organization.first(:conditions => {:cp_key => params[:id].tr(' ', '_')})
raise HttpErrors::NotFound, _("Couldn't find organization '#{params[:id]}'") if @organization.nil?
Expand Down

0 comments on commit 469ba52

Please sign in to comment.