]> git.openstreetmap.org Git - rails.git/blobdiff - app/abilities/api_capability.rb
Merge pull request #5034 from grischard/patch-4
[rails.git] / app / abilities / api_capability.rb
index f27dd2e63a515d0a0bf51571b6a49d6a5032c954..44e67634552599c861f9320209e8a7810a155edd 100644 (file)
@@ -19,6 +19,8 @@ class ApiCapability
         can [:gpx_files], User if scope?(token, :read_gpx)
         can [:index, :show], UserPreference if scope?(token, :read_prefs)
         can [:update, :update_all, :destroy], UserPreference if scope?(token, :write_prefs)
+        can [:inbox, :outbox, :show, :update, :destroy], Message if scope?(token, :consume_messages)
+        can [:create], Message if scope?(token, :send_messages)
 
         if user.terms_agreed?
           can [:create, :update, :upload, :close, :subscribe, :unsubscribe], Changeset if scope?(token, :write_api)