Use CanCanCan for search controller
This commit is contained in:
parent
3baffaf9a2
commit
ad68d4c634
2 changed files with 2 additions and 0 deletions
|
@ -11,6 +11,7 @@ class Ability
|
|||
:search_geonames, :search_osm_nominatim_reverse, :search_geonames_reverse], :geocoder
|
||||
can [:index, :create, :comment, :feed, :show, :search, :mine], Note
|
||||
can [:index, :show], Redaction
|
||||
can [:search_all, :search_nodes, :search_ways, :search_relations], :search
|
||||
can [:terms, :api_users, :login, :logout, :new, :create, :save, :confirm, :confirm_resend, :confirm_email, :lost_password, :reset_password, :show, :api_read, :auth_success, :auth_failure], User
|
||||
can [:index, :show, :blocks_on, :blocks_by], UserBlock
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ class SearchController < ApplicationController
|
|||
# Can search by tag k, v, or both (type->k,value->v)
|
||||
# Can search by name (k=name,v=....)
|
||||
skip_before_action :verify_authenticity_token
|
||||
authorize_resource :class => false
|
||||
|
||||
def search_all
|
||||
do_search(true, true, true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue