Use CanCanCan for directions controller
This commit is contained in:
parent
1e30edba53
commit
7420479cde
2 changed files with 2 additions and 0 deletions
|
@ -6,6 +6,7 @@ class Ability
|
|||
def initialize(user)
|
||||
can [:relation, :relation_history, :way, :way_history, :node, :node_history, :changeset, :note], :browse
|
||||
can :index, ChangesetComment
|
||||
can :search, :direction
|
||||
can [:index, :permalink, :edit, :help, :fixthemap, :offline, :export, :about, :preview, :copyright, :key, :id], :site
|
||||
can [:index, :rss, :show, :comments], DiaryEntry
|
||||
can [:finish, :embed], :export
|
||||
|
|
|
@ -2,6 +2,7 @@ class DirectionsController < ApplicationController
|
|||
before_action :authorize_web
|
||||
before_action :set_locale
|
||||
before_action :require_oauth, :only => [:search]
|
||||
authorize_resource :class => false
|
||||
|
||||
def search
|
||||
render :layout => map_layout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue