mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-25 06:48:01 -05:00
Add "subscribe" oauth2 scope.
This commit is contained in:
@@ -2094,6 +2094,7 @@ class ApiController(RedditController, OAuth2ResourceController):
|
||||
c.user._commit()
|
||||
|
||||
|
||||
@require_oauth2_scope("subscribe")
|
||||
@noresponse(VUser(),
|
||||
VModhash(),
|
||||
action = VOneOf('action', ('sub', 'unsub')),
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user