* web: Fix numeric values in search select inputs.
* web: Fix ARIA attributes on menu items.
* web: Fix issues surrounding nested modal actions, selectors, labels.
* web: Prepare group forms for testing, ARIA, etc.
* web: Clarify when spinner buttons are busy.
* web: Fix dark theme toggle input visibility.
* web: Fix issue where tests complete before optional search inputs load.
* web: Add user creation tests, group creation. Flesh out fixtures.
* providers/oauth2: only issue new refresh token if old one is about to expire
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
* make configurable
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
* tests and fixes
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
* sigh
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
---------
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Reproduction:
1. Attempt to create a service account: fill out the username and click Create.
2. There's a popup giving you your username and token. Click Close
3. Attempt to click Create Service Account again, the Create button should be here this time.
Root Cause: When the form is reset (it happens when the modal is closed), it was resetting the form data and clearing the result but not restoring the showSubmitButton property back to true.
* web: Add InvalidationFlow to Radius Provider dialogues
## What
- Bugfix: adds the InvalidationFlow to the Radius Provider dialogues
- Repairs: `{"invalidation_flow":["This field is required."]}` message, which was *not* propagated
to the Notification.
- Nitpick: Pretties `?foo=${true}` expressions: `s/\?([^=]+)=\$\{true\}/\1/`
## Note
Yes, I know I'm going to have to do more magic when we harmonize the forms, and no, I didn't add the
Property Mappings to the wizard, and yes, I know I'm going to have pain with the *new* version of
the wizard. But this is a serious bug; you can't make Radius servers with *either* of the current
dialogues at the moment.
* This (temporary) change is needed to prevent the unit tests from failing.
\# What
\# Why
\# How
\# Designs
\# Test Steps
\# Other Notes
* Revert "This (temporary) change is needed to prevent the unit tests from failing."
This reverts commit dddde09be5.
* This commit refactors `ak-page-navbar` into rendering elements that support a more DOM-oriented behavior model. The core insights here is that there were two signals being propagated through the system: “page detail change” and “toggle sidebar,” and that they are *Events*.
## What
### Changes to Sidebar handling.
The event `SidebarToggle` has been changed to a more generic `PageNavMenuToggle`, so that we’re not dictating what kind of main menu the UI provides. It has also been made a typed, global event, rather than a CustomEvent. `ak-page-navbar` sends it, and `ak-interface-admin` listens for it, the way Hermes intended. Because events from `ak-page-navbar` propagate *up*,
### Changes to the Page Navbar
The static, ad-hoc handler for page identity has been replaced with a bog-standard event listener. The event listener is placed on `window`, and so has been added to the `connectCallback()/disconnectCallback()` portions of the lifecycle so it is removed successfully on disconnect.
I have also moved the Websocket event handler (`EVENT_WS_MESSAGE`) into the `connectCallback()/disconnectCallback()` lifecycle, for the same reson.
A function, `setPageDetails(header: PageInit);` has been provided to replicate the functionality of `AKPageNavbar.setNavbrDetails()`. This function pushes the event onto `window`, to which we are listening. The event is synchronous (since its origin is in custom code), and is delivered at the same time and in the same way as the prior method.
**Why**: Primarily, it’s the standard way to do things. Both the static method and this method happen in a single JSVM microtask (the same task, actually), so there’s no change in behavior or performance. If we ever want to go to a different idiom, like making the header a child element of a route, or turning this into some series of MPAs using view-transitions and a state-managing webworker, the lifecycle components will no longer get in the way. This change also eliminates the need for every instance of `ak-page-navbar` to keep a static reference to the “current” navbar. We were not using that reference to ensure singleton status, nor clean up multiple instances, so its utility wasn’t clear.
### Changes to pages that need to update the page header details.
A mechanical script<sup>\*</sup> replaced every instance of `import ... ak-page-header` with `import { setPageDetails } from ak-page-navbar`, and every instance of `<ak-page-header ...>` with:
updated(changed: PropertyValues<this>) {
setPageDetails(header: ...derived_from_ak-page-header);
}
In several cases, this left render statements that looked like:
render() {
return html`${this.renderBody()}`;
}
… in which case I manually short-circuited the extra function call.
**Note**: Doing this sometimes resulted in a lot of whitespace changes (thank you very effin’ much, *prettier*), so some of the changes look much bigger than they should. I have made marks in the PR when this happens.
## Not Fixed
The call to `ak-page-header` in `ApplicationPage` looked like this:
<ak-page-header
header=${this.application?.name || msg("Loading")}
description=${ifPresent(this.application?.metaPublisher)}
>
<ak-app-icon
size=${PFSize.Medium}
name=${ifPresent(this.application?.name)}
icon=${ifPresent(this.application?.metaIcon)}
slot="icon"
></ak-app-icon>
</ak-page-header>
When `ak-page-header` was revised to be nothing but an pub-hub style event emitter, it lost any `render` capability at all, falling back to the `nothing` inherited from `lit-html`. That slot does not exist. `ApplicationPage` has not been able to show user-supplied application icons for awhile now, and this commit does not change that.
<hr/>
<sup>\*</sup>The script is written in elisp. If anyone wants to read it, I’m willing to message it to ya.
* web: applied several fixes to the PR as requested.
* One more hack.
* Missed a bug that prevented Storybook from deploying.
* Prettier has some (silly) opinions.
* web: Clarify required marker when using screen reader.
* web: Mark helper text as input descriptor.
* web: Use next domain when in development.
* web: Clean up constants. Fix attribute mapping.
* web: use previous function name.
* web: Fix sort.
* web: Use constant.
* web: Use prefix.
* web: keep using current release for notes.
* web: saml provider view: fix state refresh issues
Fixes the following issues:
1. Fixed incorrect certificate download when changing a signing certificate - previously, clicking "Download Signing Certificate" after updating a certificate would still download the old certificate until the page was refreshed.
2. Fixed missing UI updates when adding a signing certificate - previously, when a signing certificate was added to a provider, the download button wouldn't appear until the page was refreshed.
3. Fixed persistent download button when removing a certificate - previously, when a signing certificate was removed from a provider, the download button would still be visible until the page was refreshed.
* prob has more uses than for certs only
* teffen's suggestions
Signed-off-by: Dominic R <dominic@sdko.org>
* fix
Signed-off-by: Dominic R <dominic@sdko.org>
* this should fix it?
Signed-off-by: Dominic R <dominic@sdko.org>
---------
Signed-off-by: Dominic R <dominic@sdko.org>
* web: Fix issue where controlled element is not assigned.
* web: Fix preferred error to display when API response include fields.
* web: Clarify error message alert.
* web: Fix issue where impersonation form can be submitted with empty
fields. Clarify message behavior.
* web: Clean up naming of inputs.
* web: Flesh out label components, slots.
* web: Expand clickable area of labels.
* web: Fix issue where launch URL is required.
* web: Surface string errors verbatim.
* web: Fix issues surrounding client-side error reporting, form validation,
server-side error reporting.
* web: Clarify property visibility.
* web: Fix issue where provider errors are not surfaced.
* web: Fix issue where wizard steps do not consistently use form validation.
* web: Fix issue where render root is not preferred.
* web: Fix import path.
* web: Fix selectors.
* keep labels aligned
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
* web: Fix field nesting.
* web: Fix issue where required secret text inputs fail validation when editing existing entities.
- We need to make the component have a better understanding of this concept.
* web: Fix slot alignment on legacy elements.
---------
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>