]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/access_token.rb
Add support for OAuth2 using doorkeeper
[rails.git] / app / models / access_token.rb
index e5ba2e240916cce272059fa4abd316501ed785ac..1a5ff8553c825a785ee5fff21fa1aa42dcae618c 100644 (file)
@@ -45,6 +45,10 @@ class AccessToken < OauthToken
 
   before_create :set_authorized_at
 
+  def includes_scope?(scope)
+    self[:"allow_#{scope}"]
+  end
+
   protected
 
   def set_authorized_at