Rework templates for OAuth2
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
7ea36a5415
commit
9b26207515
7 changed files with 185 additions and 41 deletions
|
|
@ -157,7 +157,7 @@ class ScopesView(LoginRequiredMixin, TemplateView):
|
|||
scopes = PermissionScopes()
|
||||
context["scopes"] = {}
|
||||
all_scopes = scopes.get_all_scopes()
|
||||
for app in Application.objects.filter(Q(user=self.request.user) | Q(client_type='public')).all():
|
||||
for app in Application.objects.filter(user=self.request.user).all():
|
||||
available_scopes = scopes.get_available_scopes(app)
|
||||
context["scopes"][app] = OrderedDict()
|
||||
items = [(k, v) for (k, v) in all_scopes.items() if k in available_scopes]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue