]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4359'
authorTom Hughes <tom@compton.nu>
Sun, 16 Feb 2025 09:04:17 +0000 (09:04 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 16 Feb 2025 09:04:17 +0000 (09:04 +0000)
1  2 
app/abilities/api_ability.rb
config/routes.rb

index ec4de8f8e03b99dc795f88cecf6421aefb11c00e,d183aca74bb10ee7a90420c52fe29fa2fd53fdb3..acacec049af1f20f6372c3a008945961fdda6c29
@@@ -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 b3fc5af15900002fe06d4fe8e5cef36315528d5e,0a6ab0356f855e4fe3190fc808f619fca53693a6..0ffd0a546c431552257073e2e206759da2901c11
@@@ -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
        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
        resource :terms, :only => [:show, :update]
        resource :pd_declaration, :only => [:show, :create]
        resource :deletion, :only => :show
 +      resource :home, :only => :show
      end
    end