Use CanCanCan for browse controller
This commit is contained in:
parent
44eea9dcaf
commit
1e30edba53
2 changed files with 2 additions and 0 deletions
|
@ -4,6 +4,7 @@ class Ability
|
|||
include CanCan::Ability
|
||||
|
||||
def initialize(user)
|
||||
can [:relation, :relation_history, :way, :way_history, :node, :node_history, :changeset, :note], :browse
|
||||
can :index, ChangesetComment
|
||||
can [:index, :permalink, :edit, :help, :fixthemap, :offline, :export, :about, :preview, :copyright, :key, :id], :site
|
||||
can [:index, :rss, :show, :comments], DiaryEntry
|
||||
|
|
|
@ -6,6 +6,7 @@ class BrowseController < ApplicationController
|
|||
before_action(:except => [:query]) { |c| c.check_database_readable(true) }
|
||||
before_action :require_oauth
|
||||
around_action :web_timeout
|
||||
authorize_resource :class => false
|
||||
|
||||
def relation
|
||||
@type = "relation"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue