diff options
Diffstat (limited to 'api/oauth.go')
-rw-r--r-- | api/oauth.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/api/oauth.go b/api/oauth.go index a239e889b..bd52d05ed 100644 --- a/api/oauth.go +++ b/api/oauth.go @@ -41,6 +41,10 @@ func registerOAuthApp(c *Context, w http.ResponseWriter, r *http.Request) { return } + if !app.SessionHasPermissionTo(c.Session, model.PERMISSION_MANAGE_SYSTEM) { + oauthApp.IsTrusted = false + } + oauthApp.CreatorId = c.Session.UserId rapp, err := app.CreateOAuthApp(oauthApp) |