b225b0200e
root: early spring clean for linting ( #8498 )
...
* remove pyright
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* remove pylint
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* replace pylint with ruff
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* ruff fix
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space >
* fix UP038
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix DJ012
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix default arg
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix UP031
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* rename stage type to view
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix DJ008
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix remaining upgrade
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix PLR2004
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix B904
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix PLW2901
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix remaining issues
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* prevent ruff from breaking the code
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* stages/prompt: refactor field building
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space >
* fix tests
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix lint
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fully remove isort
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
---------
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space >
Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space >
2024-02-24 18:13:35 +01:00
8949464294
root: reformat with latest black version and fix tests ( #8376 )
...
* format files
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix pyright
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* revert #8367
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 >
2024-01-31 15:24:45 +01:00
15d7175750
blueprints: fix entries with state: absent not being deleted if their serializer has errors ( #7345 )
...
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
2023-10-27 16:28:56 +02:00
7649a57495
core: create app transactional api ( #6446 )
...
* initial api and schema
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* separate blueprint importer from yaml parsing
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* cleanup
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* add new "must_created" state to blueprints to prevent overwriting objects
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* rework validation and error response to make it actually usable
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix lint errors
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* add defaults
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix tests
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* rework transaction_rollback
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* use static method for string imports of subclass
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* slight cleanup
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
---------
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
2023-09-17 23:55:21 +02:00
30cb38ac6d
blueprints: fix tag values not resolved correctly ( #6653 )
...
* blueprints: fix tag values not resolved correctly
this lead to `null` in an `!Env` tag being returned as `"null"`
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* make blueprint user password optional
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* ensure user doesn't have a usable password set when its an empty string
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
---------
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
2023-08-28 18:27:44 +02:00
10b0c84d97
root: migrate bootstrap to blueprints ( #6433 )
...
* remove old bootstrap
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* add meta model to set user password
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* ensure KeyOf works with objects in the state of created that already exist
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* migrate
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* add support for shorter form !If tag
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* allow !Context to resolve other yaml tags
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* don't require serializer to be valid for deleting an object
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix check if a model is being created
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* remove duplicate way to set password
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* migrate token
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* only change what is required with migrations
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* add description
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix admin status
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* expand tests
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* don't require bootstrap in events to fix ci?
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
---------
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
2023-07-31 19:34:46 +02:00
6e0c9acb34
events: exclude base models from model audit log
...
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
2023-01-18 15:11:33 +01:00
9568f4dbd6
root: improve code style ( #4436 )
...
* cleanup pylint comments
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* remove more
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* fix url name
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
* *: use ExtractHour instead of ExtractDay
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
Signed-off-by: Jens Langhammer <jens@goauthentik.io >
2023-01-15 17:02:31 +01:00
c63ba3f378
blueprints: Fix resolve model_name in !Find
tag ( #4371 )
...
Resolve model_name in !Find tag
2023-01-06 09:49:28 +01:00
53cab07a48
blueprints: Add !Enumerate
, !Value
and !Index
tags ( #4338 )
...
* Added For and Item tags
* Removed Sequence node support from ForItem tag
* Added ForItemIndex tag
* Added support for iterating over mappings
* Added support for mapping output body
* Renamed tags: For to Enumerate, ForItem to Value, ForItemIndex to Index
* Refactored tests
* Formatting
* Improved exception info
* Improved error handing
* Added docs
* lint
* Small doc improvements
* Replaced deepcopy() call with call to copy()
* Fix mistake in docs example
* Fix missed "!" in example
2023-01-05 21:36:19 +01:00
ce5d1fd80d
blueprints: Resolve yamltags in state and model attributes ( #4299 )
...
* Fixed state and model attributes not resolving yaml tags
* Linting
2022-12-29 10:05:32 +01:00
8f3579ba45
blueprints: add !If
tag ( #4264 )
...
* Added \!If tag
* Fix typo
* Removed trailing whitespace
Signed-off-by: sdimovv <36302090+sdimovv@users.noreply.github.com >
* format blueprint fixtures
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
Signed-off-by: sdimovv <36302090+sdimovv@users.noreply.github.com >
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
Co-authored-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-12-26 16:20:22 +01:00
94b9ebb0bb
blueprints: add Env tag
...
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-12-24 20:41:51 +01:00
7f662ac2f3
blueprints: Added conditional entry application ( #4167 )
...
* blueprints: Added !AsBool tag
* Renamed AsBool tag to Condition
* Added conditions attributed to BlueprintEntry
* Added docs for the conditions attribute of a blueprint entry
* Website linting fix
* add new tag to vscode settings
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
Co-authored-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-12-21 17:04:00 +00:00
1f7d52c5ce
blueprints: Support nested custom tags in !Find
and !Format
tags ( #4127 )
...
* Added support for nested tags to !Find and !Format
* Added tests
* Fix variable names
* Added docs
* Fixed small mistake in tests
* Fixed variable names
* Broke example into multiple lines
2022-12-01 16:10:26 +01:00
ab3d47c437
blueprints: add desired state attribute to objects ( #4061 )
...
* add state attribute to delete objects
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* add tests, move yaml from block to files
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* add state to docs
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* only try to format
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-11-22 14:27:20 +01:00
b0d4f035f1
blueprints: fix error when cleaning up unset attribute
...
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-10-21 22:12:59 +02:00
3f570bb96d
blueprints: improve error handling
...
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-10-21 20:18:02 +02:00
74a0e27a8c
blueprints: fix error when exporting objects with lazily translated strings
...
closes #3482
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-10-14 14:31:44 +02:00
ae9dbf3014
blueprints: fix error caused by overriding rest_framework's instance attribute
...
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-09-10 14:34:43 +02:00
62f93c83d4
ci: update pyright ( #3546 )
2022-09-07 00:23:25 +02:00
54ba3e9616
blueprints: add meta model to apply blueprint within blueprint for dependencies ( #3486 )
...
* add meta model to apply blueprint within blueprint for dependencies
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* fix tests
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* use custom registry
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* fix again
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* move ManagedAppConfig to apps.py
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* rename manager to registry
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* ci: use full tag in comment
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-08-29 21:20:58 +02:00
0ab8f4eed7
blueprints: add required password stage backends
...
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-08-19 15:59:41 +01:00
9d58407e25
blueprints: remove _state from exporter blueprints
...
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-08-18 19:25:02 +02:00
0e9762072a
blueprints: keep more modular state
...
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-08-18 17:42:27 +02:00
872c18dddc
blueprints: don't use example label, add more tags and tests for tags
...
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-08-07 19:27:03 +02:00
dcbf106daa
blueprints: add !Context to lookup things from instance context
...
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-08-06 20:54:00 +02:00
89fef0ae72
blueprints: docs ( #3376 )
...
* further blueprint cleanup
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* more
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* make group users and parent optional
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* fix api client usage
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-08-06 00:52:12 +02:00
d1004e3798
blueprints: webui ( #3356 )
2022-08-03 00:05:49 +02:00
89c84f10d0
blueprints: v1 ( #1573 )
...
* managed: move flowexporter to managed
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* *: implement SerializerModel in all models
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* managed: add initial api
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* managed: start blueprint
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* managed: spec
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* version blueprint
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* yep
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* remove v2, improve v1
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* start custom tag, more rebrand
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* add default flows
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* move blueprints out of website
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* try new things
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* add !lookup, fix web
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* update and cleanup default
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* fix tags in lists
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* don't save field if its set to default value
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* more flow cleanup
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* format web
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* fix missing serializer for sms
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* ignore _set fields
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* remove custom file extension
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* migrate default flow to tenant
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* include blueprints
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
* fix tests
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org >
2022-07-31 17:11:44 +02:00