summaryrefslogtreecommitdiffstats
path: root/routers/web/user/setting/applications.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/user/setting/applications.go')
-rw-r--r--routers/web/user/setting/applications.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/routers/web/user/setting/applications.go b/routers/web/user/setting/applications.go
index 23c215738d..b66806ff2d 100644
--- a/routers/web/user/setting/applications.go
+++ b/routers/web/user/setting/applications.go
@@ -42,9 +42,15 @@ func ApplicationsPost(ctx *context.Context) {
return
}
+ scope, err := form.GetScope()
+ if err != nil {
+ ctx.ServerError("GetScope", err)
+ return
+ }
t := &auth_model.AccessToken{
- UID: ctx.Doer.ID,
- Name: form.Name,
+ UID: ctx.Doer.ID,
+ Name: form.Name,
+ Scope: scope,
}
exist, err := auth_model.AccessTokenByNameExists(t)