- - {% trans 'Applications' %} -
-{{ app.name }}
-diff --git a/Makefile b/Makefile index 47eed18b7..dbe0462f4 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,15 @@ all: lint-fix lint coverage gen -test-full: - coverage run manage.py test --failfast -v 3 . - coverage html - coverage report - test-integration: k3d cluster create || exit 0 k3d kubeconfig write -o ~/.kube/config --overwrite - coverage run manage.py test --failfast -v 3 tests/integration + coverage run manage.py test -v 3 tests/integration test-e2e: - coverage run manage.py test --failfast -v 3 tests/e2e + coverage run manage.py test -v 3 tests/e2e coverage: - coverage run manage.py test --failfast -v 3 authentik + coverage run manage.py test -v 3 authentik coverage html coverage report diff --git a/Pipfile b/Pipfile index 7dcb084a0..e322c1d71 100644 --- a/Pipfile +++ b/Pipfile @@ -6,6 +6,9 @@ verify_ssl = true [packages] boto3 = "*" celery = "*" +channels = "*" +channels-redis = "*" +dacite = "*" defusedxml = "*" django = "*" django-cors-middleware = "*" @@ -15,37 +18,32 @@ django-guardian = "*" django-model-utils = "*" django-otp = "*" django-prometheus = "*" -django-recaptcha = "*" django-redis = "*" -djangorestframework = "*" django-storages = "*" +djangorestframework = "*" djangorestframework-guardian = "*" +docker = "*" drf_yasg2 = "*" facebook-sdk = "*" +geoip2 = "*" +gunicorn = "*" +kubernetes = "*" ldap3 = "*" lxml = "*" packaging = "*" psycopg2-binary = "*" pycryptodome = "*" pyjwkest = "*" -uvicorn = {extras = ["standard"],version = "*"} -gunicorn = "*" pyyaml = "*" -qrcode = "*" requests-oauthlib = "*" sentry-sdk = "*" service_identity = "*" structlog = "*" swagger-spec-validator = "*" urllib3 = {extras = ["secure"],version = "*"} -dacite = "*" -channels = "*" -channels-redis = "*" -kubernetes = "*" -docker = "*" -xmlsec = "*" -geoip2 = "*" +uvicorn = {extras = ["standard"],version = "*"} webauthn = "*" +xmlsec = "*" [requires] python_version = "3.9" @@ -57,8 +55,7 @@ black = "==20.8b1" bumpversion = "*" colorama = "*" coverage = "*" -django-debug-toolbar = "*" -pylint = "*" +pylint = "<=2.6.0" pylint-django = "*" selenium = "*" prospector = "*" diff --git a/Pipfile.lock b/Pipfile.lock index edc7f3208..1b2df6e8c 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "933685b75680e3a06d2f523239d848b14d1507d385de42401863f4fb6345366c" + "sha256": "88f986d5c35e42ee1890acc2510b99507d268f8d6b0d3ab5abe8d37c53706379" }, "pipfile-spec": 6, "requires": { @@ -56,6 +56,7 @@ "sha256:fbd3b5e18d34683decc00d9a360179ac1e7a320a5fee10ab8053ffd6deab76e0", "sha256:feb24ff1226beeb056e247cf2e24bba5232519efb5645121c4aea5b6ad74c1f2" ], + "markers": "python_version >= '3.6'", "version": "==3.7.4" }, "aioredis": { @@ -70,6 +71,7 @@ "sha256:1e759a7f202d910939de6eca45c23a107f6b71111f41d1282c648e9ac3d21901", "sha256:affdd263d8b8eb3c98170b78bf83867cdb6a14901d586e00ddb65bfe2f0c4e60" ], + "markers": "python_version >= '3.6'", "version": "==5.0.5" }, "asgiref": { @@ -77,6 +79,7 @@ "sha256:5ee950735509d04eb673bd7f7120f8fa1c9e2df495394992c73234d526907e17", "sha256:7162a3cb30ab0609f1a4c95938fd73e8604f63bdba516a7f7d64b83ff09478f0" ], + "markers": "python_version >= '3.5'", "version": "==3.3.1" }, "async-timeout": { @@ -84,6 +87,7 @@ "sha256:0c3c816a028d47f659d6ff5c745cb2acf1f966da1fe5c19c77a70282b25f4c5f", "sha256:4291ca197d287d274d0b6cb5d6f8f8f82d434ed288f962539ff18cc9012f9ea3" ], + "markers": "python_full_version >= '3.5.3'", "version": "==3.0.1" }, "attrs": { @@ -91,6 +95,7 @@ "sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6", "sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==20.3.0" }, "autobahn": { @@ -98,6 +103,7 @@ "sha256:884f79c50fdc55ade2c315946a9caa145e8b10075eee9d2c2594ea5e8f5226aa", "sha256:bf7a9d302a34d0f719d43c57f65ca1f2f5c982dd6ea0c11e1e190ef6f43710fe" ], + "markers": "python_version >= '3.7'", "version": "==21.2.2" }, "automat": { @@ -127,6 +133,7 @@ "sha256:48350c0524fafcc6f1cf792a80080eeaf282c4ceed016e9296f1ebfda7c34fb3", "sha256:dd95871cf8a418ab730a219f2bfc301c98f2d9d0a294e43f51715bdd4aedd4cd" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", "version": "==1.20.16" }, "cachetools": { @@ -134,6 +141,7 @@ "sha256:1d9d5f567be80f7c07d765e21b814326d78c61eb0c3a637dffc0e5d1796cb2e2", "sha256:f469e29e7aa4cff64d8de4aad95ce76de8ea1125a16c68e0d93f65c3c3dc92e9" ], + "markers": "python_version ~= '3.5'", "version": "==4.2.1" }, "cbor2": { @@ -227,6 +235,7 @@ "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a", "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==7.1.2" }, "click-didyoumean": { @@ -300,6 +309,7 @@ "sha256:0052c9887600c57054a5867d4b0240159fa009faa3bcf6a1627271d9cdcb005a", "sha256:c22b692707f514de9013651ecb687f2abe4f35cf6fe292ece634e9f1737bc7e3" ], + "markers": "python_version >= '3.6'", "version": "==3.0.1" }, "defusedxml": { @@ -373,13 +383,6 @@ "index": "pypi", "version": "==2.1.0" }, - "django-recaptcha": { - "hashes": [ - "sha256:567784963fd5400feaf92e8951d8dbbbdb4b4c48a76e225d4baa63a2c9d2cd8c" - ], - "index": "pypi", - "version": "==2.0.6" - }, "django-redis": { "hashes": [ "sha256:1133b26b75baa3664164c3f44b9d5d133d1b8de45d94d79f38d1adc5b1d502e5", @@ -440,6 +443,7 @@ "hashes": [ "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d" ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==0.18.2" }, "geoip2": { @@ -455,6 +459,7 @@ "sha256:d3640ea61ee025d5af00e3ffd82ba0a06dd99724adaf50bdd52f49daf29f3f65", "sha256:da5218cbf33b8461d7661d6b4ad91c12c0107e2767904d5e3ae6408031d5463e" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", "version": "==1.27.0" }, "gunicorn": { @@ -470,6 +475,7 @@ "sha256:36a3cb8c0a032f56e2da7084577878a035d3b61d104230d4bd49c0c6b555a9c6", "sha256:47222cb6067e4a307d535814917cd98fd0a57b6788ce715755fa2b6c28b56042" ], + "markers": "python_version >= '3.6'", "version": "==0.12.0" }, "hiredis": { @@ -521,6 +527,7 @@ "sha256:e64be68255234bb489a574c4f2f8df7029c98c81ec4d160d6cd836e7f0679390", "sha256:e82d6b930e02e80e5109b678c663a9ed210680ded81c1abaf54635d88d1da298" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.1.0" }, "httptools": { @@ -566,6 +573,7 @@ "sha256:1a29730d366e996aaacffb2f1f1cb9593dc38e2ddd30c91250c6dde09ea9b417", "sha256:f38b2b640938a4f35ade69ac3d053042959b62a0f1076a5bbaa1b9526605a8a2" ], + "markers": "python_version >= '3.5'", "version": "==0.5.1" }, "itypes": { @@ -580,6 +588,7 @@ "sha256:03e47ad063331dd6a3f04a43eddca8a966a26ba0c5b7207a9a9e4e08f1b29419", "sha256:a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==2.11.3" }, "jmespath": { @@ -587,6 +596,7 @@ "sha256:b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9", "sha256:cdf6525904cc597730141d61b36f2e4b8ecc257c420fa2f4549bac2c2d0cb72f" ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==0.10.0" }, "jsonschema": { @@ -601,6 +611,7 @@ "sha256:6dc509178ac4269b0e66ab4881f70a2035c33d3a622e20585f965986a5182006", "sha256:f4965fba0a4718d47d470beeb5d6446e3357a62402b16c510b6a2f251e05ac3c" ], + "markers": "python_version >= '3.6'", "version": "==5.0.2" }, "kubernetes": { @@ -613,8 +624,11 @@ }, "ldap3": { "hashes": [ + "sha256:c1df41d89459be6f304e0ceec4b00fdea533dbbcd83c802b1272dcdb94620b57", + "sha256:4139c91f0eef9782df7b77c8cbc6243086affcb6a8a249b768a9658438e5da59", "sha256:18c3ee656a6775b9b0d60f7c6c5b094d878d1d90fc03d56731039f0a4b546a91", - "sha256:c1df41d89459be6f304e0ceec4b00fdea533dbbcd83c802b1272dcdb94620b57" + "sha256:8c949edbad2be8a03e719ba48bd6779f327ec156929562814b3e84ab56889c8c", + "sha256:afc6fc0d01f02af82cd7bfabd3bbfd5dc96a6ae91e97db0a2dab8a0f1b436056" ], "index": "pypi", "version": "==2.9" @@ -717,12 +731,14 @@ "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be", "sha256:feb7b34d6325451ef96bc0e36e1a6c0c1c64bc1fbec4b854f4529e51887b1621" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.1.1" }, "maxminddb": { "hashes": [ "sha256:47e86a084dd814fac88c99ea34ba3278a74bc9de5a25f4b815b608798747c7dc" ], + "markers": "python_version >= '3.6'", "version": "==2.0.3" }, "msgpack": { @@ -798,6 +814,7 @@ "sha256:f21756997ad8ef815d8ef3d34edd98804ab5ea337feedcd62fb52d22bf531281", "sha256:fc13a9524bc18b6fb6e0dbec3533ba0496bbed167c56d0aabefd965584557d80" ], + "markers": "python_version >= '3.6'", "version": "==5.1.0" }, "oauthlib": { @@ -805,6 +822,7 @@ "sha256:bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889", "sha256:df884cd6cbe20e32633f1db1072e9356f53638e4361bef4e8b03c9127c9328ea" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==3.1.0" }, "packaging": { @@ -827,6 +845,7 @@ "sha256:0fa02fa80363844a4ab4b8d6891f62dd0645ba672723130423ca4037b80c1974", "sha256:62c811e46bd09130fb11ab759012a4ae385ce4fb2073442d1898867a824183bd" ], + "markers": "python_full_version >= '3.6.1'", "version": "==3.0.16" }, "psycopg2-binary": { @@ -872,15 +891,37 @@ }, "pyasn1": { "hashes": [ + "sha256:fec3e9d8e36808a28efb59b489e4528c10ad0f480e57dcc32b4de5c9d8c9fdf3", + "sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba", + "sha256:08c3c53b75eaa48d71cf8c710312316392ed40899cb34710d092e96745a358b7", + "sha256:0458773cfe65b153891ac249bcf1b5f8f320b7c2ce462151f8fa74de8934becf", + "sha256:99fcc3c8d804d1bc6d9a099921e39d827026409a58f2a720dcdb89374ea0c776", + "sha256:78fa6da68ed2727915c4767bb386ab32cdba863caa7dbe473eaae45f9959da86", + "sha256:7ab8a544af125fb704feadb008c99a88805126fb525280b2270bb25cc1d78a12", + "sha256:6e7545f1a61025a4e58bb336952c5061697da694db1cae97b116e9c46abcf7c8", + "sha256:5c9414dcfede6e441f7e8f81b43b34e834731003427e5b09e4e00e3172a10f00", + "sha256:e89bf84b5437b532b0803ba5c9a5e054d21fec423a89952a74f87fa2c9b7bce2", + "sha256:03840c999ba71680a131cfaee6fab142e1ed9bbd9c693e285cc6aca0d555e576", "sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d", - "sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba" + "sha256:014c0e9976956a08139dc0712ae195324a75e142284d5f87f1a87ee1b068a359" ], "version": "==0.4.8" }, "pyasn1-modules": { "hashes": [ - "sha256:905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e", - "sha256:a50b808ffeb97cb3601dd25981f6b016cbb3d31fbf57a8b8a87428e6158d0c74" + "sha256:a99324196732f53093a84c4369c996713eb8c89d360a496b599fb1a9c47fc3eb", + "sha256:b80486a6c77252ea3a3e9b1e360bc9cf28eaac41263d173c032581ad2f20fe45", + "sha256:fe0644d9ab041506b62782e92b06b8c68cca799e1a9636ec398675459e031405", + "sha256:a50b808ffeb97cb3601dd25981f6b016cbb3d31fbf57a8b8a87428e6158d0c74", + "sha256:f39edd8c4ecaa4556e989147ebf219227e2cd2e8a43c7e7fcb1f1c18c5fd6a3d", + "sha256:0845a5582f6a02bb3e1bde9ecfc4bfcae6ec3210dd270522fee602365430c3f8", + "sha256:426edb7a5e8879f1ec54a1864f16b882c2837bfd06eee62f2c982315ee2473ed", + "sha256:65cebbaffc913f4fe9e4808735c95ea22d7a7775646ab690518c056784bc21b4", + "sha256:0fe1b68d1e486a1ed5473f1302bd991c1611d319bba158e98b106ff86e1d7199", + "sha256:c29a5e5cc7a3f05926aff34e097e84f8589cd790ce0ed41b67aed6857b26aafd", + "sha256:15b7c67fabc7fc240d87fb9aabf999cf82311a6d6fb2c70d00d3d0604878c811", + "sha256:cbac4bc38d117f2a49aeedec4407d23e8866ea4ac27ff2cf7fb3e5b570df19e0", + "sha256:905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e" ], "version": "==0.2.8" }, @@ -889,6 +930,7 @@ "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0", "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.20" }, "pycryptodome": { @@ -960,6 +1002,7 @@ "sha256:f933ecf4cb736c7af60a6a533db2bf569717f2318b265f92907acff1db43bc34", "sha256:fc9c55dc1ed57db76595f2d19a479fc1c3a1be2c9da8de798a93d286c5f65f38" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==3.10.1" }, "pyhamcrest": { @@ -967,6 +1010,7 @@ "sha256:412e00137858f04bde0729913874a48485665f2d36fe9ee449f26be864af9316", "sha256:7ead136e03655af85069b6f47b23eb7c3e5c221aa9f022a4fbb499f5b7308f29" ], + "markers": "python_version >= '3.5'", "version": "==2.0.2" }, "pyjwkest": { @@ -988,12 +1032,14 @@ "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.4.7" }, "pyrsistent": { "hashes": [ "sha256:2e636185d9eb976a18a8a8e96efce62f2905fea90041958d8cc2a189756ebf3e" ], + "markers": "python_version >= '3.5'", "version": "==0.17.3" }, "python-dateutil": { @@ -1001,6 +1047,7 @@ "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.8.1" }, "python-dotenv": { @@ -1044,19 +1091,12 @@ "index": "pypi", "version": "==5.4.1" }, - "qrcode": { - "hashes": [ - "sha256:3996ee560fc39532910603704c82980ff6d4d5d629f9c3f25f34174ce8606cf5", - "sha256:505253854f607f2abf4d16092c61d4e9d511a3b4392e60bff957a68592b04369" - ], - "index": "pypi", - "version": "==6.1" - }, "redis": { "hashes": [ "sha256:0e7e0cfca8660dea8b7d5cd8c4f6c5e29e11f31158c0b0ae91a397f00e5a05a2", "sha256:432b788c4530cfe16d8d943a09d40ca6c16149727e4afe8c2c9d5580c59d9f24" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==3.5.3" }, "requests": { @@ -1064,10 +1104,12 @@ "sha256:27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804", "sha256:c210084e36a42ae6b9219e00e48287def368a26d03a048ddad7bfee44f75871e" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==2.25.1" }, "requests-oauthlib": { "hashes": [ + "sha256:fa6c47b933f01060936d87ae9327fead68768b69c6c9ea2109c48be30f2d4dbc", "sha256:7f71572defaecd16372f9006f33c2ec8c077c3cfa6f5911a9a90202beb513f3d", "sha256:b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a" ], @@ -1117,6 +1159,7 @@ "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.15.0" }, "sqlparse": { @@ -1124,6 +1167,7 @@ "sha256:017cde379adbd6a1f15a61873f43e8274179378e95ef3fede90b5aa64d304ed0", "sha256:0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8" ], + "markers": "python_version >= '3.5'", "version": "==0.4.1" }, "structlog": { @@ -1171,6 +1215,7 @@ "sha256:f058bd0168271de4dcdc39845b52dd0a4a2fecf5f1246335f13f5e96eaebb467", "sha256:f3c19e5bd42bbe4bf345704ad7c326c74d3fd7a1b3844987853bef180be638d4" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==20.3.0" }, "txaio": { @@ -1178,6 +1223,7 @@ "sha256:7d6f89745680233f1c4db9ddb748df5e88d2a7a37962be174c0fd04c8dba1dc8", "sha256:c16b55f9a67b2419cfdf8846576e2ec9ba94fe6978a83080c352a80db31c93fb" ], + "markers": "python_version >= '3.6'", "version": "==21.2.1" }, "typing-extensions": { @@ -1193,6 +1239,7 @@ "sha256:07620c3f3f8eed1f12600845892b0e036a2420acf513c53f7de0abd911a5894f", "sha256:5af8ad10cec94f215e3f48112de2022e1d5a37ed427fbd88652fa908f2ab7cae" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==3.0.1" }, "urllib3": { @@ -1237,6 +1284,7 @@ "sha256:4c9dceab6f76ed92105027c49c823800dd33cacce13bdedc5b914e3514b7fb30", "sha256:7d3b1624a953da82ef63462013bbd271d3eb75751489f9807598e8f340bd637e" ], + "markers": "python_version >= '3.6'", "version": "==5.0.0" }, "watchgod": { @@ -1354,6 +1402,7 @@ "sha256:f0b059678fd549c66b89bed03efcabb009075bd131c248ecdf087bdb6faba24a", "sha256:fcbb48a93e8699eae920f8d92f7160c03567b421bc17362a9ffbbd706a816f71" ], + "markers": "python_version >= '3.6'", "version": "==1.6.3" }, "zope.interface": { @@ -1411,6 +1460,7 @@ "sha256:f37d45fab14ffef9d33a0dc3bc59ce0c5313e2253323312d47739192da94f5fd", "sha256:f44906f70205d456d503105023041f1e63aece7623b31c390a0103db4de17537" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==5.2.0" } }, @@ -1422,18 +1472,12 @@ ], "version": "==1.4.4" }, - "asgiref": { - "hashes": [ - "sha256:5ee950735509d04eb673bd7f7120f8fa1c9e2df495394992c73234d526907e17", - "sha256:7162a3cb30ab0609f1a4c95938fd73e8604f63bdba516a7f7d64b83ff09478f0" - ], - "version": "==3.3.1" - }, "astroid": { "hashes": [ "sha256:4c17cea3e592c21b6e222f673868961bad77e1f985cb1694ed077475a89229c1", "sha256:d8506842a3faf734b81599c8b98dcc423de863adcc1999248480b18bd31a0f38" ], + "markers": "python_version >= '3.5'", "version": "==2.4.1" }, "attrs": { @@ -1441,6 +1485,7 @@ "sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6", "sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==20.3.0" }, "autopep8": { @@ -1471,6 +1516,7 @@ "sha256:37f927ea17cde7ae2d7baf832f8e80ce3777624554a653006c9144f8017fe410", "sha256:762cb2bfad61f4ec8e2bdf452c7c267416f8c70dd9ecb1653fd0bbb01fa936e6" ], + "markers": "python_version >= '3.5'", "version": "==1.0.1" }, "bumpversion": { @@ -1486,6 +1532,7 @@ "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a", "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==7.1.2" }, "colorama": { @@ -1551,22 +1598,6 @@ "index": "pypi", "version": "==5.4" }, - "django": { - "hashes": [ - "sha256:32ce792ee9b6a0cbbec340123e229ac9f765dff8c2a4ae9247a14b2ba3a365a7", - "sha256:baf099db36ad31f970775d0be5587cc58a6256a6771a44eb795b554d45f211b8" - ], - "index": "pypi", - "version": "==3.1.7" - }, - "django-debug-toolbar": { - "hashes": [ - "sha256:84e2607d900dbd571df0a2acf380b47c088efb787dce9805aefeb407341961d2", - "sha256:9e5a25d0c965f7e686f6a8ba23613ca9ca30184daa26487706d4829f5cfb697a" - ], - "index": "pypi", - "version": "==3.2" - }, "dodgy": { "hashes": [ "sha256:28323cbfc9352139fdd3d316fa17f325cc0e9ac74438cbba51d70f9b48f86c3a", @@ -1579,6 +1610,7 @@ "sha256:749dbbd6bfd0cf1318af27bf97a14e28e5ff548ef8e5b1566ccfb25a11e7c839", "sha256:aadae8761ec651813c24be05c6f7b4680857ef6afaae4651a4eccaef97ce6c3b" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==3.8.4" }, "flake8-polyfill": { @@ -1593,6 +1625,7 @@ "sha256:91f36bfb1ab7949b3b40e23736db18231bf7593edada2ba5c3a174a7b23657ac", "sha256:c9e1f2d0db7ddb9a704c2a0217be31214e91a4fe1dea1efad19ae42ba0c285c9" ], + "markers": "python_version >= '3.4'", "version": "==4.0.5" }, "gitpython": { @@ -1600,6 +1633,7 @@ "sha256:8621a7e777e276a5ec838b59280ba5272dd144a18169c36c903d8b38b99f750a", "sha256:c5347c81d232d9b8e7f47b68a83e5dc92e7952127133c5f2df9133f2c75a1b29" ], + "markers": "python_version >= '3.4'", "version": "==3.1.13" }, "iniconfig": { @@ -1614,6 +1648,7 @@ "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1", "sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==4.3.21" }, "lazy-object-proxy": { @@ -1640,6 +1675,7 @@ "sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a473e1d38f7d3e4", "sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.4.3" }, "mccabe": { @@ -1676,6 +1712,7 @@ "sha256:5fad80b613c402d5b7df7bd84812548b2a61e9977387a80a5fc5c396492b13c9", "sha256:b236cde0ac9a6aedd5e3c34517b423cd4fd97ef723849da6b0d2231142d89c00" ], + "markers": "python_version >= '2.6'", "version": "==5.5.1" }, "pep8-naming": { @@ -1690,6 +1727,7 @@ "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0", "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==0.13.1" }, "prospector": { @@ -1704,6 +1742,7 @@ "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3", "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.10.0" }, "pycodestyle": { @@ -1711,6 +1750,7 @@ "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367", "sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01dfd55085434192e" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.6.0" }, "pydocstyle": { @@ -1718,6 +1758,7 @@ "sha256:19b86fa8617ed916776a11cd8bc0197e5b9856d5433b777f51a3defe13075325", "sha256:aca749e190a01726a4fb472dd4ef23b5c9da7b9205c0a7857c06533de13fd678" ], + "markers": "python_version >= '3.5'", "version": "==5.1.1" }, "pyflakes": { @@ -1725,6 +1766,7 @@ "sha256:0d94e0e05a19e57a99444b6ddcf9a6eb2e5c68d3ca1e98e90707af8152c90a92", "sha256:35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df2cfac9e3c27fc8" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.2.0" }, "pylint": { @@ -1767,6 +1809,7 @@ "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.4.7" }, "pytest": { @@ -1785,13 +1828,6 @@ "index": "pypi", "version": "==4.1.0" }, - "pytz": { - "hashes": [ - "sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da", - "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798" - ], - "version": "==2021.1" - }, "pyyaml": { "hashes": [ "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf", @@ -1890,6 +1926,7 @@ "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.15.0" }, "smmap": { @@ -1897,6 +1934,7 @@ "sha256:7bfcf367828031dc893530a29cb35eb8c8f2d7c8f2d0989354d75d24c8573714", "sha256:84c2751ef3072d4f6b2785ec7ee40244c6f45eb934d9e543e2c51f1bd3d54c50" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==3.0.5" }, "snowballstemmer": { @@ -1906,18 +1944,12 @@ ], "version": "==2.1.0" }, - "sqlparse": { - "hashes": [ - "sha256:017cde379adbd6a1f15a61873f43e8274179378e95ef3fede90b5aa64d304ed0", - "sha256:0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8" - ], - "version": "==0.4.1" - }, "stevedore": { "hashes": [ "sha256:3a5bbd0652bf552748871eaa73a4a8dc2899786bc497a2aa1fcb4dcdb0debeee", "sha256:50d7b78fbaf0d04cd62411188fa7eedcb03eb7f4c4b37005615ceebe582aa82a" ], + "markers": "python_version >= '3.6'", "version": "==3.3.0" }, "toml": { @@ -1925,6 +1957,7 @@ "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b", "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==0.10.2" }, "typed-ast": { diff --git a/authentik/admin/tests/test_api.py b/authentik/admin/tests/test_api.py index 5b4d66933..870c45c11 100644 --- a/authentik/admin/tests/test_api.py +++ b/authentik/admin/tests/test_api.py @@ -1,8 +1,8 @@ """test admin api""" from json import loads -from django.shortcuts import reverse from django.test import TestCase +from django.urls import reverse from authentik import __version__ from authentik.core.models import Group, User diff --git a/authentik/admin/tests/test_generated.py b/authentik/admin/tests/test_generated.py index 5f9399a07..af63fe1ed 100644 --- a/authentik/admin/tests/test_generated.py +++ b/authentik/admin/tests/test_generated.py @@ -3,8 +3,8 @@ from importlib import import_module from typing import Callable from django.forms import ModelForm -from django.shortcuts import reverse from django.test import Client, TestCase +from django.urls import reverse from django.urls.exceptions import NoReverseMatch from authentik.admin.urls import urlpatterns diff --git a/authentik/admin/views/certificate_key_pair.py b/authentik/admin/views/certificate_key_pair.py index 1e2ea400a..046abd802 100644 --- a/authentik/admin/views/certificate_key_pair.py +++ b/authentik/admin/views/certificate_key_pair.py @@ -5,6 +5,7 @@ from django.contrib.auth.mixins import ( ) from django.contrib.messages.views import SuccessMessageMixin from django.http.response import HttpResponse +from django.urls import reverse_lazy from django.utils.translation import gettext as _ from django.views.generic import UpdateView from django.views.generic.edit import FormView @@ -33,7 +34,7 @@ class CertificateKeyPairCreateView( permission_required = "authentik_crypto.add_certificatekeypair" template_name = "generic/create.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully created Certificate-Key Pair") @@ -50,7 +51,7 @@ class CertificateKeyPairGenerateView( permission_required = "authentik_crypto.add_certificatekeypair" template_name = "administration/certificatekeypair/generate.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully generated Certificate-Key Pair") def form_valid(self, form: CertificateKeyPairGenerateForm) -> HttpResponse: @@ -77,7 +78,7 @@ class CertificateKeyPairUpdateView( permission_required = "authentik_crypto.change_certificatekeypair" template_name = "generic/update.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully updated Certificate-Key Pair") @@ -90,5 +91,5 @@ class CertificateKeyPairDeleteView( permission_required = "authentik_crypto.delete_certificatekeypair" template_name = "generic/delete.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully deleted Certificate-Key Pair") diff --git a/authentik/admin/views/flows.py b/authentik/admin/views/flows.py index 9cfa6ffd2..25855db33 100644 --- a/authentik/admin/views/flows.py +++ b/authentik/admin/views/flows.py @@ -6,6 +6,7 @@ from django.contrib.auth.mixins import ( ) from django.contrib.messages.views import SuccessMessageMixin from django.http import HttpRequest, HttpResponse, JsonResponse +from django.urls import reverse_lazy from django.utils.translation import gettext as _ from django.views.generic import DetailView, FormView, UpdateView from guardian.mixins import PermissionRequiredMixin @@ -36,7 +37,7 @@ class FlowCreateView( permission_required = "authentik_flows.add_flow" template_name = "generic/create.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully created Flow") @@ -53,7 +54,7 @@ class FlowUpdateView( permission_required = "authentik_flows.change_flow" template_name = "generic/update.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully updated Flow") @@ -64,7 +65,7 @@ class FlowDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageV permission_required = "authentik_flows.delete_flow" template_name = "generic/delete.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully deleted Flow") @@ -104,7 +105,7 @@ class FlowImportView(LoginRequiredMixin, FormView): form_class = FlowImportForm template_name = "administration/flow/import.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") def dispatch(self, request, *args, **kwargs): if not request.user.is_superuser: diff --git a/authentik/admin/views/groups.py b/authentik/admin/views/groups.py index 74a77b5f1..d50bc708f 100644 --- a/authentik/admin/views/groups.py +++ b/authentik/admin/views/groups.py @@ -4,6 +4,7 @@ from django.contrib.auth.mixins import ( PermissionRequiredMixin as DjangoPermissionRequiredMixin, ) from django.contrib.messages.views import SuccessMessageMixin +from django.urls import reverse_lazy from django.utils.translation import gettext as _ from django.views.generic import UpdateView from guardian.mixins import PermissionRequiredMixin @@ -27,7 +28,7 @@ class GroupCreateView( permission_required = "authentik_core.add_group" template_name = "generic/create.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully created Group") @@ -44,7 +45,7 @@ class GroupUpdateView( permission_required = "authentik_core.change_group" template_name = "generic/update.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully updated Group") @@ -55,5 +56,5 @@ class GroupDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessage permission_required = "authentik_flows.delete_group" template_name = "generic/delete.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully deleted Group") diff --git a/authentik/admin/views/outposts_service_connections.py b/authentik/admin/views/outposts_service_connections.py index 442690bed..e82ffabbd 100644 --- a/authentik/admin/views/outposts_service_connections.py +++ b/authentik/admin/views/outposts_service_connections.py @@ -4,6 +4,7 @@ from django.contrib.auth.mixins import ( PermissionRequiredMixin as DjangoPermissionRequiredMixin, ) from django.contrib.messages.views import SuccessMessageMixin +from django.urls import reverse_lazy from django.utils.translation import gettext as _ from guardian.mixins import PermissionRequiredMixin @@ -27,7 +28,7 @@ class OutpostServiceConnectionCreateView( permission_required = "authentik_outposts.add_outpostserviceconnection" template_name = "generic/create.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully created Outpost Service Connection") @@ -43,7 +44,7 @@ class OutpostServiceConnectionUpdateView( permission_required = "authentik_outposts.change_outpostserviceconnection" template_name = "generic/update.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully updated Outpost Service Connection") @@ -56,5 +57,5 @@ class OutpostServiceConnectionDeleteView( permission_required = "authentik_outposts.delete_outpostserviceconnection" template_name = "generic/delete.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully deleted Outpost Service Connection") diff --git a/authentik/admin/views/policies.py b/authentik/admin/views/policies.py index bb18a3502..85a246b0e 100644 --- a/authentik/admin/views/policies.py +++ b/authentik/admin/views/policies.py @@ -7,6 +7,7 @@ from django.contrib.auth.mixins import ( ) from django.contrib.messages.views import SuccessMessageMixin from django.http import HttpResponse +from django.urls import reverse_lazy from django.utils.translation import gettext as _ from django.views.generic import FormView from django.views.generic.detail import DetailView @@ -34,7 +35,7 @@ class PolicyCreateView( permission_required = "authentik_policies.add_policy" template_name = "generic/create.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully created Policy") @@ -50,7 +51,7 @@ class PolicyUpdateView( permission_required = "authentik_policies.change_policy" template_name = "generic/update.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully updated Policy") @@ -61,7 +62,7 @@ class PolicyDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessag permission_required = "authentik_policies.delete_policy" template_name = "generic/delete.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully deleted Policy") diff --git a/authentik/admin/views/policies_bindings.py b/authentik/admin/views/policies_bindings.py index 336f0dd64..2626a0f99 100644 --- a/authentik/admin/views/policies_bindings.py +++ b/authentik/admin/views/policies_bindings.py @@ -7,6 +7,7 @@ from django.contrib.auth.mixins import ( ) from django.contrib.messages.views import SuccessMessageMixin from django.db.models import Max +from django.urls import reverse_lazy from django.utils.translation import gettext as _ from django.views.generic import UpdateView from guardian.mixins import PermissionRequiredMixin @@ -30,7 +31,7 @@ class PolicyBindingCreateView( form_class = PolicyBindingForm template_name = "generic/create.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully created PolicyBinding") def get_initial(self) -> dict[str, Any]: @@ -63,7 +64,7 @@ class PolicyBindingUpdateView( form_class = PolicyBindingForm template_name = "generic/update.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully updated PolicyBinding") @@ -76,5 +77,5 @@ class PolicyBindingDeleteView( permission_required = "authentik_policies.delete_policybinding" template_name = "generic/delete.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully deleted PolicyBinding") diff --git a/authentik/admin/views/stages.py b/authentik/admin/views/stages.py index 049b591e4..b63b2fcef 100644 --- a/authentik/admin/views/stages.py +++ b/authentik/admin/views/stages.py @@ -4,6 +4,7 @@ from django.contrib.auth.mixins import ( PermissionRequiredMixin as DjangoPermissionRequiredMixin, ) from django.contrib.messages.views import SuccessMessageMixin +from django.urls import reverse_lazy from django.utils.translation import gettext as _ from guardian.mixins import PermissionRequiredMixin @@ -27,7 +28,7 @@ class StageCreateView( template_name = "generic/create.html" permission_required = "authentik_flows.add_stage" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully created Stage") @@ -42,7 +43,7 @@ class StageUpdateView( model = Stage permission_required = "authentik_flows.update_application" template_name = "generic/update.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully updated Stage") @@ -52,5 +53,5 @@ class StageDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessage model = Stage template_name = "generic/delete.html" permission_required = "authentik_flows.delete_stage" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully deleted Stage") diff --git a/authentik/admin/views/stages_bindings.py b/authentik/admin/views/stages_bindings.py index e8376e6b3..b1038eb1f 100644 --- a/authentik/admin/views/stages_bindings.py +++ b/authentik/admin/views/stages_bindings.py @@ -7,6 +7,7 @@ from django.contrib.auth.mixins import ( ) from django.contrib.messages.views import SuccessMessageMixin from django.db.models import Max +from django.urls import reverse_lazy from django.utils.translation import gettext as _ from django.views.generic import UpdateView from guardian.mixins import PermissionRequiredMixin @@ -30,7 +31,7 @@ class StageBindingCreateView( form_class = FlowStageBindingForm template_name = "generic/create.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully created StageBinding") def get_initial(self) -> dict[str, Any]: @@ -61,7 +62,7 @@ class StageBindingUpdateView( form_class = FlowStageBindingForm template_name = "generic/update.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully updated StageBinding") @@ -74,5 +75,5 @@ class StageBindingDeleteView( permission_required = "authentik_flows.delete_flowstagebinding" template_name = "generic/delete.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully deleted FlowStageBinding") diff --git a/authentik/admin/views/stages_invitations.py b/authentik/admin/views/stages_invitations.py index 3e87247cc..f792c875d 100644 --- a/authentik/admin/views/stages_invitations.py +++ b/authentik/admin/views/stages_invitations.py @@ -5,6 +5,7 @@ from django.contrib.auth.mixins import ( ) from django.contrib.messages.views import SuccessMessageMixin from django.http import HttpResponseRedirect +from django.urls import reverse_lazy from django.utils.translation import gettext as _ from guardian.mixins import PermissionRequiredMixin @@ -27,7 +28,7 @@ class InvitationCreateView( permission_required = "authentik_stages_invitation.add_invitation" template_name = "generic/create.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully created Invitation") def form_valid(self, form): @@ -46,5 +47,5 @@ class InvitationDeleteView( permission_required = "authentik_stages_invitation.delete_invitation" template_name = "generic/delete.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully deleted Invitation") diff --git a/authentik/admin/views/stages_prompts.py b/authentik/admin/views/stages_prompts.py index d61b04850..a9ab27668 100644 --- a/authentik/admin/views/stages_prompts.py +++ b/authentik/admin/views/stages_prompts.py @@ -4,6 +4,7 @@ from django.contrib.auth.mixins import ( PermissionRequiredMixin as DjangoPermissionRequiredMixin, ) from django.contrib.messages.views import SuccessMessageMixin +from django.urls import reverse_lazy from django.utils.translation import gettext as _ from django.views.generic import UpdateView from guardian.mixins import PermissionRequiredMixin @@ -27,7 +28,7 @@ class PromptCreateView( permission_required = "authentik_stages_prompt.add_prompt" template_name = "generic/create.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully created Prompt") @@ -44,7 +45,7 @@ class PromptUpdateView( permission_required = "authentik_stages_prompt.change_prompt" template_name = "generic/update.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully updated Prompt") @@ -55,5 +56,5 @@ class PromptDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessag permission_required = "authentik_stages_prompt.delete_prompt" template_name = "generic/delete.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully deleted Prompt") diff --git a/authentik/admin/views/tokens.py b/authentik/admin/views/tokens.py index 0dc6ce311..966189227 100644 --- a/authentik/admin/views/tokens.py +++ b/authentik/admin/views/tokens.py @@ -1,5 +1,6 @@ """authentik Token administration""" from django.contrib.auth.mixins import LoginRequiredMixin +from django.urls import reverse_lazy from django.utils.translation import gettext as _ from guardian.mixins import PermissionRequiredMixin @@ -14,5 +15,5 @@ class TokenDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessage permission_required = "authentik_core.delete_token" template_name = "generic/delete.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully deleted Token") diff --git a/authentik/admin/views/users.py b/authentik/admin/views/users.py index 379a8c641..cd521cd03 100644 --- a/authentik/admin/views/users.py +++ b/authentik/admin/views/users.py @@ -7,7 +7,8 @@ from django.contrib.auth.mixins import ( from django.contrib.messages.views import SuccessMessageMixin from django.http import HttpRequest, HttpResponse from django.http.response import HttpResponseRedirect -from django.shortcuts import redirect, reverse +from django.shortcuts import redirect +from django.urls import reverse_lazy from django.utils.http import urlencode from django.utils.translation import gettext as _ from django.views.generic import DetailView, UpdateView @@ -32,7 +33,7 @@ class UserCreateView( permission_required = "authentik_core.add_user" template_name = "generic/create.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully created User") @@ -51,7 +52,7 @@ class UserUpdateView( # By default the object's name is user which is used by other checks context_object_name = "object" template_name = "generic/update.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully updated User") @@ -64,7 +65,7 @@ class UserDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageV # By default the object's name is user which is used by other checks context_object_name = "object" template_name = "generic/delete.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully deleted User") @@ -79,7 +80,7 @@ class UserDisableView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessage # By default the object's name is user which is used by other checks context_object_name = "object" template_name = "administration/user/disable.html" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully disabled User") def delete(self, request: HttpRequest, *args, **kwargs) -> HttpResponse: @@ -100,7 +101,7 @@ class UserEnableView(LoginRequiredMixin, PermissionRequiredMixin, DetailView): # By default the object's name is user which is used by other checks context_object_name = "object" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") success_message = _("Successfully enabled User") def get(self, request: HttpRequest, *args, **kwargs): @@ -124,7 +125,7 @@ class UserPasswordResetView(LoginRequiredMixin, PermissionRequiredMixin, DetailV ) querystring = urlencode({"token": token.key}) link = request.build_absolute_uri( - reverse("authentik_flows:default-recovery") + f"?{querystring}" + reverse_lazy("authentik_flows:default-recovery") + f"?{querystring}" ) messages.success( request, _("Password reset link:
%(link)s" % {"link": link}) diff --git a/authentik/admin/views/utils.py b/authentik/admin/views/utils.py index f17b1b354..28fa1a08c 100644 --- a/authentik/admin/views/utils.py +++ b/authentik/admin/views/utils.py @@ -4,6 +4,7 @@ from typing import Any from django.contrib import messages from django.contrib.messages.views import SuccessMessageMixin from django.http import Http404 +from django.urls import reverse_lazy from django.views.generic import DeleteView, UpdateView from authentik.lib.utils.reflection import all_subclasses @@ -13,7 +14,7 @@ from authentik.lib.views import CreateAssignPermView class DeleteMessageView(SuccessMessageMixin, DeleteView): """DeleteView which shows `self.success_message` on successful deletion""" - success_url = "/" + success_url = reverse_lazy("authentik_core:shell") def delete(self, request, *args, **kwargs): messages.success(self.request, self.success_message) diff --git a/authentik/api/v2/urls.py b/authentik/api/v2/urls.py index a96cc1c6f..df1bd26eb 100644 --- a/authentik/api/v2/urls.py +++ b/authentik/api/v2/urls.py @@ -26,6 +26,7 @@ from authentik.events.api.notification_transport import NotificationTransportVie from authentik.flows.api.bindings import FlowStageBindingViewSet from authentik.flows.api.flows import FlowViewSet from authentik.flows.api.stages import StageViewSet +from authentik.flows.views import FlowExecutorView from authentik.outposts.api.outpost_service_connections import ( DockerServiceConnectionViewSet, KubernetesServiceConnectionViewSet, @@ -175,4 +176,9 @@ urlpatterns = [ name="schema-swagger-ui", ), path("redoc/", SchemaView.with_ui("redoc", cache_timeout=0), name="schema-redoc"), + path( + "flows/executor/
{{ app.name }}
-{{ form.non_field_errors }}
@@ -13,7 +13,7 @@ {% if field.field.widget|fieldtype == 'HiddenInput' %} {{ field }} {% else %} -