From: Tom Hughes Date: Sun, 16 Feb 2025 09:04:17 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/4359' X-Git-Tag: live~223 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/d90f353e5f30c35fdfc61a462fdb39b3504998ce?ds=sidebyside;hp=-c Merge remote-tracking branch 'upstream/pull/4359' --- d90f353e5f30c35fdfc61a462fdb39b3504998ce diff --combined app/abilities/api_ability.rb index ec4de8f8e,d183aca74..acacec049 --- a/app/abilities/api_ability.rb +++ b/app/abilities/api_ability.rb @@@ -11,6 -11,7 +11,7 @@@ class ApiAbilit can :create, Note unless user can [:read, :download], Changeset + can :read, ChangesetComment can :read, Tracepoint can :read, User can :read, [Node, Way, Relation, OldNode, OldWay, OldRelation] @@@ -43,9 -44,7 +44,9 @@@ can :destroy, Note if scopes.include?("write_notes") - can :redact, [OldNode, OldWay, OldRelation] if user&.terms_agreed? && scopes.include?("write_redactions") + can :redact, [OldNode, OldWay, OldRelation] if user.terms_agreed? && scopes.include?("write_redactions") + + can :create, UserBlock if scopes.include?("write_blocks") end end end diff --combined config/routes.rb index b3fc5af15,0a6ab0356..0ffd0a546 --- a/config/routes.rb +++ b/config/routes.rb @@@ -38,6 -38,8 +38,8 @@@ OpenStreetMap::Application.routes.draw end namespace :api, :path => "api/0.6" do + resources :changeset_comments, :only => :index + resources :nodes, :only => [:index, :create] resources :nodes, :path => "node", :id => /\d+/, :only => [:show, :update, :destroy] do scope :module => :nodes do @@@ -121,7 -123,7 +123,7 @@@ resource :subscription, :only => [:create, :destroy], :controller => "note_subscriptions" end - resources :user_blocks, :only => :show, :id => /\d+/, :controller => "user_blocks" + resources :user_blocks, :only => [:show, :create], :id => /\d+/, :controller => "user_blocks" namespace :user_blocks, :path => "user/blocks" do resource :active_list, :path => "active", :only => :show end @@@ -300,7 -302,6 +302,7 @@@ resource :terms, :only => [:show, :update] resource :pd_declaration, :only => [:show, :create] resource :deletion, :only => :show + resource :home, :only => :show end end