From d38328976e2c8bb0fab91e656042a0d8ac37bc76 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Wed, 6 Sep 2017 16:24:34 -0400 Subject: Various patches --- api/oauth.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'api/oauth.go') 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) -- cgit v1.2.3-1-g7c22