Merge branch 'master' into otp-rework
# Conflicts: # passbook/flows/models.py # passbook/stages/otp/models.py # swagger.yaml
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
"""OAuth Client models"""
|
||||
from typing import Optional
|
||||
|
||||
from django.db import models
|
||||
from django.urls import reverse, reverse_lazy
|
||||
@ -61,16 +62,10 @@ class OAuthSource(Source):
|
||||
return f"Callback URL: <pre>{url}</pre>"
|
||||
|
||||
@property
|
||||
def ui_user_settings(self) -> UIUserSettings:
|
||||
icon_type = self.provider_type
|
||||
if icon_type == "azure ad":
|
||||
icon_type = "windows"
|
||||
icon_class = f"fab fa-{icon_type}"
|
||||
def ui_user_settings(self) -> Optional[UIUserSettings]:
|
||||
view_name = "passbook_sources_oauth:oauth-client-user"
|
||||
return UIUserSettings(
|
||||
name=self.name,
|
||||
icon=icon_class,
|
||||
view_name=reverse((view_name), kwargs={"source_slug": self.slug}),
|
||||
name=self.name, url=reverse(view_name, kwargs={"source_slug": self.slug}),
|
||||
)
|
||||
|
||||
def __str__(self) -> str:
|
||||
|
||||
@ -153,7 +153,7 @@ class Processor:
|
||||
self, request: HttpRequest, flow: Flow, **kwargs
|
||||
) -> HttpResponse:
|
||||
kwargs[PLAN_CONTEXT_SSO] = True
|
||||
request.session[SESSION_KEY_PLAN] = FlowPlanner(flow).plan(request, kwargs,)
|
||||
request.session[SESSION_KEY_PLAN] = FlowPlanner(flow).plan(request, kwargs)
|
||||
return redirect_with_qs(
|
||||
"passbook_flows:flow-executor-shell", request.GET, flow_slug=flow.slug,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user