lib/sync/outgoing: add dry run (#13244)

* lib/sync/outgoing: add dry run

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* add option to temporarily override dry run

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* web a

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* web b

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* format

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* add some test

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* add more tests

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* add dry run label

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* add support for entra too

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* add web

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* add entra test and improve error handling

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L.
2025-03-01 19:44:17 +00:00
committed by GitHub
parent 9b01213990
commit b5a8957720
25 changed files with 469 additions and 31 deletions

View File

@ -119,12 +119,28 @@ export class SyncObjectForm extends Form<SyncObjectRequest> {
renderForm() {
return html` ${this.model === SyncObjectModelEnum.AuthentikCoreModelsUser
? this.renderSelectUser()
: nothing}
${this.model === SyncObjectModelEnum.AuthentikCoreModelsGroup
? this.renderSelectGroup()
: nothing}
${this.result ? this.renderResult() : html``}`;
? this.renderSelectUser()
: nothing}
${this.model === SyncObjectModelEnum.AuthentikCoreModelsGroup
? this.renderSelectGroup()
: nothing}
<ak-form-element-horizontal name="overrideDryRun">
<label class="pf-c-switch">
<input class="pf-c-switch__input" type="checkbox" />
<span class="pf-c-switch__toggle">
<span class="pf-c-switch__toggle-icon">
<i class="fas fa-check" aria-hidden="true"></i>
</span>
</span>
<span class="pf-c-switch__label">${msg("Override dry-run mode")}</span>
</label>
<p class="pf-c-form__helper-text">
${msg(
"When enabled, this sync will still execute mutating requests regardless of the dry-run mode in the provider.",
)}
</p>
</ak-form-element-horizontal>
${this.result ? this.renderResult() : html``}`;
}
}