From 2944d9f03cf6344f0b49e7c1e6d84d036f1386dd Mon Sep 17 00:00:00 2001
From: Julian Rother <julianr@fsmpi.rwth-aachen.de>
Date: Fri, 13 Nov 2020 23:57:49 +0100
Subject: [PATCH] fix oauth2 default scope injection

---
 uffd/oauth2/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/uffd/oauth2/views.py b/uffd/oauth2/views.py
index 50b808fc..31b1354b 100644
--- a/uffd/oauth2/views.py
+++ b/uffd/oauth2/views.py
@@ -71,7 +71,7 @@ def inject_scope(func):
 	@functools.wraps(func)
 	def decorator(*args, **kwargs):
 		args = request.args.to_dict()
-		if 'profile' not in args:
+		if not args.get('scope'):
 			args['scope'] = 'profile'
 		request.args = ImmutableMultiDict(args)
 		return func(*args, **kwargs)
-- 
GitLab