Add "subscribe" oauth2 scope.

This commit is contained in:
Logan Hanks
2012-09-14 13:31:12 -07:00
parent ee87d2de54
commit 808ae9bd25
2 changed files with 7 additions and 1 deletions

View File

@@ -2094,6 +2094,7 @@ class ApiController(RedditController, OAuth2ResourceController):
c.user._commit()
@require_oauth2_scope("subscribe")
@noresponse(VUser(),
VModhash(),
action = VOneOf('action', ('sub', 'unsub')),

View File

@@ -108,7 +108,7 @@ class OAuth2Scope:
},
"mysubreddits": {
"id": "mysubreddits",
"name": _("My Subscriptions"),
"name": _("My Subreddits"),
"description": _(
"Access the list of subreddits I moderate, contribute to,"
" and subscribe to."),
@@ -118,6 +118,11 @@ class OAuth2Scope:
"name": _("Submit Content"),
"description": _("Submit links and comments from my account."),
},
"subscribe": {
"id": "subscribe",
"name": _("Edit My Subscriptions"),
"description": _("Manage my subreddit subscriptions."),
},
}
def __init__(self, scope_str=None):