]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/client_application.rb
The value of mapParams.object is always a node/way/relation now
[rails.git] / app / models / client_application.rb
index 55f34e6e2fc451b9dac06204c9302f4ae1503afa..ff031d62b7ff1736a7f7dde15f25ee89bf834cfe 100644 (file)
@@ -2,7 +2,7 @@ require 'oauth'
 
 class ClientApplication < ActiveRecord::Base
   belongs_to :user
-  has_many :tokens, :class_name => "OauthToken"
+  has_many :tokens, :class_name => "OauthToken", :dependent => :delete_all
   has_many :access_tokens
   has_many :oauth2_verifiers
   has_many :oauth_tokens
@@ -82,7 +82,8 @@ protected
   # have to say up-front what permissions they want and when users sign up they
   # can agree or not agree to each of them.
   PERMISSIONS = [:allow_read_prefs, :allow_write_prefs, :allow_write_diary,
-                 :allow_write_api, :allow_read_gpx, :allow_write_gpx ]
+                 :allow_write_api, :allow_read_gpx, :allow_write_gpx,
+                 :allow_write_notes]
 
   def generate_keys
     self.key = OAuth::Helper.generate_key(40)[0,40]