wip: rename to authentik (#361)
* root: initial rename * web: rename custom element prefix * root: rename external functions with pb_ prefix * root: fix formatting * root: replace domain with goauthentik.io * proxy: update path * root: rename remaining prefixes * flows: rename file extension * root: pbadmin -> akadmin * docs: fix image filenames * lifecycle: ignore migration files * ci: copy default config from current source before loading last tagged * *: new sentry dsn * tests: fix missing python3.9-dev package * root: add additional migrations for service accounts created by outposts * core: mark system-created service accounts with attribute * policies/expression: fix pb_ replacement not working * web: fix last linting errors, add lit-analyse * policies/expressions: fix lint errors * web: fix sidebar display on screens where not all items fit * proxy: attempt to fix proxy pipeline * proxy: use go env GOPATH to get gopath * lib: fix user_default naming inconsistency * docs: add upgrade docs * docs: update screenshots to use authentik * admin: fix create button on empty-state of outpost * web: fix modal submit not refreshing SiteShell and Table * web: fix height of app-card and height of generic icon * web: fix rendering of subtext * admin: fix version check error not being caught * web: fix worker count not being shown * docs: update screenshots * root: new icon * web: fix lint error * admin: fix linting error * root: migrate coverage config to pyproject
This commit is contained in:
@ -27,7 +27,7 @@ values =
|
|||||||
|
|
||||||
[bumpversion:file:.github/workflows/release.yml]
|
[bumpversion:file:.github/workflows/release.yml]
|
||||||
|
|
||||||
[bumpversion:file:passbook/__init__.py]
|
[bumpversion:file:authentik/__init__.py]
|
||||||
|
|
||||||
[bumpversion:file:proxy/pkg/version.go]
|
[bumpversion:file:proxy/pkg/version.go]
|
||||||
|
|
||||||
|
33
.coveragerc
33
.coveragerc
@ -1,33 +0,0 @@
|
|||||||
[run]
|
|
||||||
source = passbook
|
|
||||||
relative_files = true
|
|
||||||
omit =
|
|
||||||
*/asgi.py
|
|
||||||
manage.py
|
|
||||||
*/migrations/*
|
|
||||||
*/apps.py
|
|
||||||
website/
|
|
||||||
|
|
||||||
[report]
|
|
||||||
sort = Cover
|
|
||||||
skip_covered = True
|
|
||||||
precision = 2
|
|
||||||
exclude_lines =
|
|
||||||
pragma: no cover
|
|
||||||
|
|
||||||
# Don't complain about missing debug-only code:
|
|
||||||
def __unicode__
|
|
||||||
def __str__
|
|
||||||
def __repr__
|
|
||||||
if self\.debug
|
|
||||||
if TYPE_CHECKING
|
|
||||||
|
|
||||||
# Don't complain if tests don't hit defensive assertion code:
|
|
||||||
raise AssertionError
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
# Don't complain if non-runnable code isn't run:
|
|
||||||
if 0:
|
|
||||||
if __name__ == .__main__.:
|
|
||||||
|
|
||||||
show_missing = True
|
|
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -27,7 +27,7 @@ If applicable, add screenshots to help explain your problem.
|
|||||||
Output of docker-compose logs or kubectl logs respectively
|
Output of docker-compose logs or kubectl logs respectively
|
||||||
|
|
||||||
**Version and Deployment (please complete the following information):**
|
**Version and Deployment (please complete the following information):**
|
||||||
- passbook version: [e.g. 0.10.0-stable]
|
- authentik version: [e.g. 0.10.0-stable]
|
||||||
- Deployment: [e.g. docker-compose, helm]
|
- Deployment: [e.g. docker-compose, helm]
|
||||||
|
|
||||||
**Additional context**
|
**Additional context**
|
||||||
|
34
.github/workflows/release.yml
vendored
34
.github/workflows/release.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: passbook-on-release
|
name: authentik-on-release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
@ -18,13 +18,13 @@ jobs:
|
|||||||
- name: Building Docker Image
|
- name: Building Docker Image
|
||||||
run: docker build
|
run: docker build
|
||||||
--no-cache
|
--no-cache
|
||||||
-t beryju/passbook:0.12.11-stable
|
-t beryju/authentik:0.12.11-stable
|
||||||
-t beryju/passbook:latest
|
-t beryju/authentik:latest
|
||||||
-f Dockerfile .
|
-f Dockerfile .
|
||||||
- name: Push Docker Container to Registry (versioned)
|
- name: Push Docker Container to Registry (versioned)
|
||||||
run: docker push beryju/passbook:0.12.11-stable
|
run: docker push beryju/authentik:0.12.11-stable
|
||||||
- name: Push Docker Container to Registry (latest)
|
- name: Push Docker Container to Registry (latest)
|
||||||
run: docker push beryju/passbook:latest
|
run: docker push beryju/authentik:latest
|
||||||
build-proxy:
|
build-proxy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -36,7 +36,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd proxy
|
cd proxy
|
||||||
go get -u github.com/go-swagger/go-swagger/cmd/swagger
|
go get -u github.com/go-swagger/go-swagger/cmd/swagger
|
||||||
swagger generate client -f ../swagger.yaml -A passbook -t pkg/
|
swagger generate client -f ../swagger.yaml -A authentik -t pkg/
|
||||||
go build -v .
|
go build -v .
|
||||||
- name: Docker Login Registry
|
- name: Docker Login Registry
|
||||||
env:
|
env:
|
||||||
@ -48,13 +48,13 @@ jobs:
|
|||||||
cd proxy/
|
cd proxy/
|
||||||
docker build \
|
docker build \
|
||||||
--no-cache \
|
--no-cache \
|
||||||
-t beryju/passbook-proxy:0.12.11-stable \
|
-t beryju/authentik-proxy:0.12.11-stable \
|
||||||
-t beryju/passbook-proxy:latest \
|
-t beryju/authentik-proxy:latest \
|
||||||
-f Dockerfile .
|
-f Dockerfile .
|
||||||
- name: Push Docker Container to Registry (versioned)
|
- name: Push Docker Container to Registry (versioned)
|
||||||
run: docker push beryju/passbook-proxy:0.12.11-stable
|
run: docker push beryju/authentik-proxy:0.12.11-stable
|
||||||
- name: Push Docker Container to Registry (latest)
|
- name: Push Docker Container to Registry (latest)
|
||||||
run: docker push beryju/passbook-proxy:latest
|
run: docker push beryju/authentik-proxy:latest
|
||||||
build-static:
|
build-static:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -69,13 +69,13 @@ jobs:
|
|||||||
cd web/
|
cd web/
|
||||||
docker build \
|
docker build \
|
||||||
--no-cache \
|
--no-cache \
|
||||||
-t beryju/passbook-static:0.12.11-stable \
|
-t beryju/authentik-static:0.12.11-stable \
|
||||||
-t beryju/passbook-static:latest \
|
-t beryju/authentik-static:latest \
|
||||||
-f Dockerfile .
|
-f Dockerfile .
|
||||||
- name: Push Docker Container to Registry (versioned)
|
- name: Push Docker Container to Registry (versioned)
|
||||||
run: docker push beryju/passbook-static:0.12.11-stable
|
run: docker push beryju/authentik-static:0.12.11-stable
|
||||||
- name: Push Docker Container to Registry (latest)
|
- name: Push Docker Container to Registry (latest)
|
||||||
run: docker push beryju/passbook-static:latest
|
run: docker push beryju/authentik-static:latest
|
||||||
test-release:
|
test-release:
|
||||||
needs:
|
needs:
|
||||||
- build-server
|
- build-server
|
||||||
@ -87,11 +87,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y pwgen
|
sudo apt-get install -y pwgen
|
||||||
echo "PG_PASS=$(pwgen 40 1)" >> .env
|
echo "PG_PASS=$(pwgen 40 1)" >> .env
|
||||||
echo "PASSBOOK_SECRET_KEY=$(pwgen 50 1)" >> .env
|
echo "AUTHENTIK_SECRET_KEY=$(pwgen 50 1)" >> .env
|
||||||
docker-compose pull -q
|
docker-compose pull -q
|
||||||
docker-compose up --no-start
|
docker-compose up --no-start
|
||||||
docker-compose start postgresql redis
|
docker-compose start postgresql redis
|
||||||
docker-compose run -u root --entrypoint /bin/bash server -c "pip install --no-cache -r requirements-dev.txt && ./manage.py test passbook"
|
docker-compose run -u root --entrypoint /bin/bash server -c "pip install --no-cache -r requirements-dev.txt && ./manage.py test authentik"
|
||||||
sentry-release:
|
sentry-release:
|
||||||
needs:
|
needs:
|
||||||
- test-release
|
- test-release
|
||||||
@ -103,7 +103,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||||
SENTRY_ORG: beryjuorg
|
SENTRY_ORG: beryjuorg
|
||||||
SENTRY_PROJECT: passbook
|
SENTRY_PROJECT: authentik
|
||||||
SENTRY_URL: https://sentry.beryju.org
|
SENTRY_URL: https://sentry.beryju.org
|
||||||
with:
|
with:
|
||||||
tagName: 0.12.11-stable
|
tagName: 0.12.11-stable
|
||||||
|
16
.github/workflows/tag.yml
vendored
16
.github/workflows/tag.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: passbook-on-tag
|
name: authentik-on-tag
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -14,17 +14,17 @@ jobs:
|
|||||||
- name: Pre-release test
|
- name: Pre-release test
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y pwgen
|
sudo apt-get install -y pwgen
|
||||||
echo "PASSBOOK_TAG=latest" >> .env
|
echo "AUTHENTIK_TAG=latest" >> .env
|
||||||
echo "PG_PASS=$(pwgen 40 1)" >> .env
|
echo "PG_PASS=$(pwgen 40 1)" >> .env
|
||||||
echo "PASSBOOK_SECRET_KEY=$(pwgen 50 1)" >> .env
|
echo "AUTHENTIK_SECRET_KEY=$(pwgen 50 1)" >> .env
|
||||||
docker-compose pull -q
|
docker-compose pull -q
|
||||||
docker build \
|
docker build \
|
||||||
--no-cache \
|
--no-cache \
|
||||||
-t beryju/passbook:latest \
|
-t beryju/authentik:latest \
|
||||||
-f Dockerfile .
|
-f Dockerfile .
|
||||||
docker-compose up --no-start
|
docker-compose up --no-start
|
||||||
docker-compose start postgresql redis
|
docker-compose start postgresql redis
|
||||||
docker-compose run -u root --entrypoint /bin/bash server -c "pip install --no-cache -r requirements-dev.txt && ./manage.py test passbook"
|
docker-compose run -u root --entrypoint /bin/bash server -c "pip install --no-cache -r requirements-dev.txt && ./manage.py test authentik"
|
||||||
- name: Install Helm
|
- name: Install Helm
|
||||||
run: |
|
run: |
|
||||||
apt update && apt install -y curl
|
apt update && apt install -y curl
|
||||||
@ -33,7 +33,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
helm dependency update helm/
|
helm dependency update helm/
|
||||||
helm package helm/
|
helm package helm/
|
||||||
mv passbook-*.tgz passbook-chart.tgz
|
mv authentik-*.tgz authentik-chart.tgz
|
||||||
- name: Extract version number
|
- name: Extract version number
|
||||||
id: get_version
|
id: get_version
|
||||||
uses: actions/github-script@0.2.0
|
uses: actions/github-script@0.2.0
|
||||||
@ -58,6 +58,6 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
asset_path: ./passbook-chart.tgz
|
asset_path: ./authentik-chart.tgz
|
||||||
asset_name: passbook-chart.tgz
|
asset_name: authentik-chart.tgz
|
||||||
asset_content_type: application/gzip
|
asset_content_type: application/gzip
|
||||||
|
12
Dockerfile
12
Dockerfile
@ -30,18 +30,18 @@ RUN apt-get update && \
|
|||||||
# but then we have to drop permmissions later
|
# but then we have to drop permmissions later
|
||||||
groupadd -g 998 docker_998 && \
|
groupadd -g 998 docker_998 && \
|
||||||
groupadd -g 999 docker_999 && \
|
groupadd -g 999 docker_999 && \
|
||||||
adduser --system --no-create-home --uid 1000 --group --home /passbook passbook && \
|
adduser --system --no-create-home --uid 1000 --group --home /authentik authentik && \
|
||||||
usermod -a -G docker_998 passbook && \
|
usermod -a -G docker_998 authentik && \
|
||||||
usermod -a -G docker_999 passbook && \
|
usermod -a -G docker_999 authentik && \
|
||||||
mkdir /backups && \
|
mkdir /backups && \
|
||||||
chown passbook:passbook /backups
|
chown authentik:authentik /backups
|
||||||
|
|
||||||
COPY ./passbook/ /passbook
|
COPY ./authentik/ /authentik
|
||||||
COPY ./pytest.ini /
|
COPY ./pytest.ini /
|
||||||
COPY ./manage.py /
|
COPY ./manage.py /
|
||||||
COPY ./lifecycle/ /lifecycle
|
COPY ./lifecycle/ /lifecycle
|
||||||
|
|
||||||
USER passbook
|
USER authentik
|
||||||
STOPSIGNAL SIGINT
|
STOPSIGNAL SIGINT
|
||||||
ENV TMPDIR /dev/shm/
|
ENV TMPDIR /dev/shm/
|
||||||
ENTRYPOINT [ "/lifecycle/bootstrap.sh" ]
|
ENTRYPOINT [ "/lifecycle/bootstrap.sh" ]
|
||||||
|
18
Makefile
18
Makefile
@ -9,30 +9,30 @@ test-e2e:
|
|||||||
coverage run manage.py test --failfast -v 3 tests/e2e
|
coverage run manage.py test --failfast -v 3 tests/e2e
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
coverage run manage.py test --failfast -v 3 passbook
|
coverage run manage.py test --failfast -v 3 authentik
|
||||||
coverage html
|
coverage html
|
||||||
coverage report
|
coverage report
|
||||||
|
|
||||||
lint-fix:
|
lint-fix:
|
||||||
isort -rc .
|
isort -rc authentik tests lifecycle
|
||||||
black passbook tests lifecycle
|
black authentik tests lifecycle
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
pyright passbook tests lifecycle
|
pyright authentik tests lifecycle
|
||||||
bandit -r passbook tests lifecycle -x node_modules
|
bandit -r authentik tests lifecycle -x node_modules
|
||||||
pylint passbook tests lifecycle
|
pylint authentik tests lifecycle
|
||||||
prospector
|
prospector
|
||||||
|
|
||||||
gen: coverage
|
gen: coverage
|
||||||
./manage.py generate_swagger -o swagger.yaml -f yaml
|
./manage.py generate_swagger -o swagger.yaml -f yaml
|
||||||
|
|
||||||
local-stack:
|
local-stack:
|
||||||
export PASSBOOK_TAG=testing
|
export AUTHENTIK_TAG=testing
|
||||||
docker build -t beryju/passbook:testng .
|
docker build -t beryju/authentik:testng .
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
docker-compose run --rm server migrate
|
docker-compose run --rm server migrate
|
||||||
|
|
||||||
build-static:
|
build-static:
|
||||||
docker-compose -f scripts/ci.docker-compose.yml up -d
|
docker-compose -f scripts/ci.docker-compose.yml up -d
|
||||||
docker build -t beryju/passbook-static -f static.Dockerfile --network=scripts_default .
|
docker build -t beryju/authentik-static -f static.Dockerfile --network=scripts_default .
|
||||||
docker-compose -f scripts/ci.docker-compose.yml down -v
|
docker-compose -f scripts/ci.docker-compose.yml down -v
|
||||||
|
26
README.md
26
README.md
@ -1,21 +1,23 @@
|
|||||||
<img src="website/static/img/logo.svg" height="50" alt="passbook logo"><img src="website/static/img/brand_inverted.svg" height="50" alt="passbook">
|
<img src="icons/icon_top_brand.svg" height="250" alt="authentik logo">
|
||||||
|
|
||||||
[](https://dev.azure.com/beryjuorg/passbook/_build?definitionId=1)
|
---
|
||||||

|
|
||||||
[](https://codecov.io/gh/BeryJu/passbook)
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
## What is passbook?
|
[](https://dev.azure.com/beryjuorg/authentik/_build?definitionId=1)
|
||||||
|
[](https://dev.azure.com/beryjuorg/authentik/_build?definitionId=1)
|
||||||
|
[](https://codecov.io/gh/BeryJu/authentik)
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
passbook is an open-source Identity Provider focused on flexibility and versatility. You can use passbook in an existing environment to add support for new protocols. passbook is also a great solution for implementing signup/recovery/etc in your application, so you don't have to deal with it.
|
## What is authentik?
|
||||||
|
|
||||||
|
authentik is an open-source Identity Provider focused on flexibility and versatility. You can use authentik in an existing environment to add support for new protocols. authentik is also a great solution for implementing signup/recovery/etc in your application, so you don't have to deal with it.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
For small/test setups it is recommended to use docker-compose, see the [documentation](https://passbook.beryju.org/docs/installation/docker-compose/)
|
For small/test setups it is recommended to use docker-compose, see the [documentation](https://goauthentik.io/docs/installation/docker-compose/)
|
||||||
|
|
||||||
For bigger setups, there is a Helm Chart in the `helm/` directory. This is documented [here](https://passbook.beryju.org/docs/installation/kubernetes/)
|
For bigger setups, there is a Helm Chart in the `helm/` directory. This is documented [here](https://goauthentik.io/docs/installation/kubernetes/)
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
@ -24,7 +26,7 @@ For bigger setups, there is a Helm Chart in the `helm/` directory. This is docum
|
|||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
See [Development Documentation](https://passbook.beryju.org/docs/development/local-dev-environment)
|
See [Development Documentation](https://goauthentik.io/docs/development/local-dev-environment)
|
||||||
|
|
||||||
## Security
|
## Security
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Supported Versions
|
## Supported Versions
|
||||||
|
|
||||||
As passbook is currently in a pre-stable, only the latest "stable" version is supported. After passbook 1.0, this will change.
|
As authentik is currently in a pre-stable, only the latest "stable" version is supported. After authentik 1.0, this will change.
|
||||||
|
|
||||||
| Version | Supported |
|
| Version | Supported |
|
||||||
| -------- | ------------------ |
|
| -------- | ------------------ |
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
"""passbook"""
|
"""authentik"""
|
||||||
__version__ = "0.12.11-stable"
|
__version__ = "0.12.11-stable"
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook administration overview"""
|
"""authentik administration overview"""
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
from drf_yasg2.utils import swagger_auto_schema
|
from drf_yasg2.utils import swagger_auto_schema
|
||||||
from rest_framework.fields import SerializerMethodField
|
from rest_framework.fields import SerializerMethodField
|
||||||
@ -8,11 +8,11 @@ from rest_framework.response import Response
|
|||||||
from rest_framework.serializers import Serializer
|
from rest_framework.serializers import Serializer
|
||||||
from rest_framework.viewsets import ViewSet
|
from rest_framework.viewsets import ViewSet
|
||||||
|
|
||||||
from passbook import __version__
|
from authentik import __version__
|
||||||
from passbook.admin.tasks import VERSION_CACHE_KEY, update_latest_version
|
from authentik.admin.tasks import VERSION_CACHE_KEY, update_latest_version
|
||||||
from passbook.core.models import Provider
|
from authentik.core.models import Provider
|
||||||
from passbook.policies.models import Policy
|
from authentik.policies.models import Policy
|
||||||
from passbook.root.celery import CELERY_APP
|
from authentik.root.celery import CELERY_APP
|
||||||
|
|
||||||
|
|
||||||
class AdministrationOverviewSerializer(Serializer):
|
class AdministrationOverviewSerializer(Serializer):
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook administration overview"""
|
"""authentik administration overview"""
|
||||||
import time
|
import time
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
@ -17,7 +17,7 @@ from rest_framework.response import Response
|
|||||||
from rest_framework.serializers import Serializer
|
from rest_framework.serializers import Serializer
|
||||||
from rest_framework.viewsets import ViewSet
|
from rest_framework.viewsets import ViewSet
|
||||||
|
|
||||||
from passbook.audit.models import Event, EventAction
|
from authentik.audit.models import Event, EventAction
|
||||||
|
|
||||||
|
|
||||||
def get_events_per_1h(**filter_kwargs) -> List[Dict[str, int]]:
|
def get_events_per_1h(**filter_kwargs) -> List[Dict[str, int]]:
|
@ -13,7 +13,7 @@ from rest_framework.response import Response
|
|||||||
from rest_framework.serializers import Serializer
|
from rest_framework.serializers import Serializer
|
||||||
from rest_framework.viewsets import ViewSet
|
from rest_framework.viewsets import ViewSet
|
||||||
|
|
||||||
from passbook.lib.tasks import TaskInfo
|
from authentik.lib.tasks import TaskInfo
|
||||||
|
|
||||||
|
|
||||||
class TaskSerializer(Serializer):
|
class TaskSerializer(Serializer):
|
11
authentik/admin/apps.py
Normal file
11
authentik/admin/apps.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
"""authentik admin app config"""
|
||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class AuthentikAdminConfig(AppConfig):
|
||||||
|
"""authentik admin app config"""
|
||||||
|
|
||||||
|
name = "authentik.admin"
|
||||||
|
label = "authentik_admin"
|
||||||
|
mountpoint = "administration/"
|
||||||
|
verbose_name = "authentik Admin"
|
@ -1,8 +1,8 @@
|
|||||||
"""passbook administration forms"""
|
"""authentik administration forms"""
|
||||||
from django import forms
|
from django import forms
|
||||||
|
|
||||||
from passbook.admin.fields import CodeMirrorWidget, YAMLField
|
from authentik.admin.fields import CodeMirrorWidget, YAMLField
|
||||||
from passbook.core.models import User
|
from authentik.core.models import User
|
||||||
|
|
||||||
|
|
||||||
class PolicyTestForm(forms.Form):
|
class PolicyTestForm(forms.Form):
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook core source form fields"""
|
"""authentik core source form fields"""
|
||||||
|
|
||||||
SOURCE_FORM_FIELDS = [
|
SOURCE_FORM_FIELDS = [
|
||||||
"name",
|
"name",
|
@ -1,9 +1,9 @@
|
|||||||
"""passbook administrative user forms"""
|
"""authentik administrative user forms"""
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
|
|
||||||
from passbook.admin.fields import CodeMirrorWidget, YAMLField
|
from authentik.admin.fields import CodeMirrorWidget, YAMLField
|
||||||
from passbook.core.models import User
|
from authentik.core.models import User
|
||||||
|
|
||||||
|
|
||||||
class UserForm(forms.ModelForm):
|
class UserForm(forms.ModelForm):
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook admin mixins"""
|
"""authentik admin mixins"""
|
||||||
from django.contrib.auth.mixins import UserPassesTestMixin
|
from django.contrib.auth.mixins import UserPassesTestMixin
|
||||||
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
"""passbook admin settings"""
|
"""authentik admin settings"""
|
||||||
from celery.schedules import crontab
|
from celery.schedules import crontab
|
||||||
|
|
||||||
CELERY_BEAT_SCHEDULE = {
|
CELERY_BEAT_SCHEDULE = {
|
||||||
"admin_latest_version": {
|
"admin_latest_version": {
|
||||||
"task": "passbook.admin.tasks.update_latest_version",
|
"task": "authentik.admin.tasks.update_latest_version",
|
||||||
"schedule": crontab(minute=0), # Run every hour
|
"schedule": crontab(minute=0), # Run every hour
|
||||||
"options": {"queue": "passbook_scheduled"},
|
"options": {"queue": "authentik_scheduled"},
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,13 +1,13 @@
|
|||||||
"""passbook admin tasks"""
|
"""authentik admin tasks"""
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
from requests import RequestException, get
|
from requests import RequestException, get
|
||||||
from structlog import get_logger
|
from structlog import get_logger
|
||||||
|
|
||||||
from passbook.lib.tasks import MonitoredTask, TaskResult, TaskResultStatus
|
from authentik.lib.tasks import MonitoredTask, TaskResult, TaskResultStatus
|
||||||
from passbook.root.celery import CELERY_APP
|
from authentik.root.celery import CELERY_APP
|
||||||
|
|
||||||
LOGGER = get_logger()
|
LOGGER = get_logger()
|
||||||
VERSION_CACHE_KEY = "passbook_latest_version"
|
VERSION_CACHE_KEY = "authentik_latest_version"
|
||||||
VERSION_CACHE_TIMEOUT = 2 * 60 * 60 # 2 hours
|
VERSION_CACHE_TIMEOUT = 2 * 60 * 60 # 2 hours
|
||||||
|
|
||||||
|
|
||||||
@ -15,9 +15,9 @@ VERSION_CACHE_TIMEOUT = 2 * 60 * 60 # 2 hours
|
|||||||
def update_latest_version(self: MonitoredTask):
|
def update_latest_version(self: MonitoredTask):
|
||||||
"""Update latest version info"""
|
"""Update latest version info"""
|
||||||
try:
|
try:
|
||||||
data = get(
|
response = get("https://api.github.com/repos/beryju/authentik/releases/latest")
|
||||||
"https://api.github.com/repos/beryju/passbook/releases/latest"
|
response.raise_for_status()
|
||||||
).json()
|
data = response.json()
|
||||||
tag_name = data.get("tag_name")
|
tag_name = data.get("tag_name")
|
||||||
cache.set(VERSION_CACHE_KEY, tag_name.split("/")[1], VERSION_CACHE_TIMEOUT)
|
cache.set(VERSION_CACHE_KEY, tag_name.split("/")[1], VERSION_CACHE_TIMEOUT)
|
||||||
self.set_status(
|
self.set_status(
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "administration/base.html" %}
|
{% extends "administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="pf-c-page__main-section pf-m-light">
|
<section class="pf-c-page__main-section pf-m-light">
|
||||||
@ -10,7 +10,7 @@
|
|||||||
<i class="pf-icon pf-icon-applications"></i>
|
<i class="pf-icon pf-icon-applications"></i>
|
||||||
{% trans 'Applications' %}
|
{% trans 'Applications' %}
|
||||||
</h1>
|
</h1>
|
||||||
<p>{% trans "External Applications which use passbook as Identity-Provider, utilizing protocols like OAuth2 and SAML." %}</p>
|
<p>{% trans "External Applications which use authentik as Identity-Provider, utilizing protocols like OAuth2 and SAML." %}</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="pf-c-page__main-section pf-m-no-padding-mobile">
|
<section class="pf-c-page__main-section pf-m-no-padding-mobile">
|
||||||
@ -20,13 +20,13 @@
|
|||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
{% include 'partials/toolbar_search.html' %}
|
{% include 'partials/toolbar_search.html' %}
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-modal-button href="{% url 'passbook_admin:application-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:application-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -68,18 +68,18 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:application-update' pk=application.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:application-update' pk=application.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Edit' %}
|
{% trans 'Edit' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:application-delete' pk=application.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:application-delete' pk=application.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -107,12 +107,12 @@
|
|||||||
{% trans 'Currently no applications exist. Click the button below to create one.' %}
|
{% trans 'Currently no applications exist. Click the button below to create one.' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:application-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:application-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "administration/base.html" %}
|
{% extends "administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="pf-c-page__main-section pf-m-light">
|
<section class="pf-c-page__main-section pf-m-light">
|
||||||
@ -20,13 +20,13 @@
|
|||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
{% include 'partials/toolbar_search.html' %}
|
{% include 'partials/toolbar_search.html' %}
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-modal-button href="{% url 'passbook_admin:certificatekeypair-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:certificatekeypair-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -63,18 +63,18 @@
|
|||||||
<code>{{ kp.fingerprint }}</code>
|
<code>{{ kp.fingerprint }}</code>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:certificatekeypair-update' pk=kp.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:certificatekeypair-update' pk=kp.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Edit' %}
|
{% trans 'Edit' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:certificatekeypair-delete' pk=kp.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:certificatekeypair-delete' pk=kp.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -102,12 +102,12 @@
|
|||||||
{% trans 'Currently no certificates exist. Click the button below to create one.' %}
|
{% trans 'Currently no certificates exist. Click the button below to create one.' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:certificatekeypair-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:certificatekeypair-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "administration/base.html" %}
|
{% extends "administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="pf-c-page__main-section pf-m-light">
|
<section class="pf-c-page__main-section pf-m-light">
|
||||||
@ -20,19 +20,19 @@
|
|||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
{% include 'partials/toolbar_search.html' %}
|
{% include 'partials/toolbar_search.html' %}
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-modal-button href="{% url 'passbook_admin:flow-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:flow-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:flow-import' %}">
|
<ak-modal-button href="{% url 'authentik_admin:flow-import' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Import' %}
|
{% trans 'Import' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -74,20 +74,20 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:flow-update' pk=flow.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:flow-update' pk=flow.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Edit' %}
|
{% trans 'Edit' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:flow-delete' pk=flow.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:flow-delete' pk=flow.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<a class="pf-c-button pf-m-secondary pb-root-link" href="{% url 'passbook_admin:flow-execute' pk=flow.pk %}?next={{ request.get_full_path }}">{% trans 'Execute' %}</a>
|
<a class="pf-c-button pf-m-secondary ak-root-link" href="{% url 'authentik_admin:flow-execute' pk=flow.pk %}?next={{ request.get_full_path }}">{% trans 'Execute' %}</a>
|
||||||
<a class="pf-c-button pf-m-secondary pb-root-link" href="{% url 'passbook_admin:flow-export' pk=flow.pk %}?next={{ request.get_full_path }}">{% trans 'Export' %}</a>
|
<a class="pf-c-button pf-m-secondary ak-root-link" href="{% url 'authentik_admin:flow-export' pk=flow.pk %}?next={{ request.get_full_path }}">{% trans 'Export' %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -115,18 +115,18 @@
|
|||||||
{% trans 'Currently no flows exist. Click the button below to create one.' %}
|
{% trans 'Currently no flows exist. Click the button below to create one.' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:flow-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:flow-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:flow-import' %}">
|
<ak-modal-button href="{% url 'authentik_admin:flow-import' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Import' %}
|
{% trans 'Import' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
@ -20,13 +20,13 @@
|
|||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
{% include 'partials/toolbar_search.html' %}
|
{% include 'partials/toolbar_search.html' %}
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-modal-button href="{% url 'passbook_admin:group-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:group-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -61,18 +61,18 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:group-update' pk=group.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:group-update' pk=group.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Edit' %}
|
{% trans 'Edit' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:group-delete' pk=group.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:group-delete' pk=group.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -100,12 +100,12 @@
|
|||||||
{% trans 'Currently no group exist. Click the button below to create one.' %}
|
{% trans 'Currently no group exist. Click the button below to create one.' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:group-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:group-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load humanize %}
|
{% load humanize %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
{% load admin_reflection %}
|
{% load admin_reflection %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<i class="pf-icon pf-icon-zone"></i>
|
<i class="pf-icon pf-icon-zone"></i>
|
||||||
{% trans 'Outposts' %}
|
{% trans 'Outposts' %}
|
||||||
</h1>
|
</h1>
|
||||||
<p>{% trans "Outposts are deployments of passbook components to support different environments and protocols, like reverse proxies." %}</p>
|
<p>{% trans "Outposts are deployments of authentik components to support different environments and protocols, like reverse proxies." %}</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="pf-c-page__main-section pf-m-no-padding-mobile">
|
<section class="pf-c-page__main-section pf-m-no-padding-mobile">
|
||||||
@ -22,13 +22,13 @@
|
|||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
{% include 'partials/toolbar_search.html' %}
|
{% include 'partials/toolbar_search.html' %}
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-modal-button href="{% url 'passbook_admin:outpost-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:outpost-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -92,18 +92,18 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:outpost-update' pk=outpost.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:outpost-update' pk=outpost.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Edit' %}
|
{% trans 'Edit' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:outpost-delete' pk=outpost.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:outpost-delete' pk=outpost.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
{% get_htmls outpost as htmls %}
|
{% get_htmls outpost as htmls %}
|
||||||
{% for html in htmls %}
|
{% for html in htmls %}
|
||||||
{{ html|safe }}
|
{{ html|safe }}
|
||||||
@ -135,12 +135,12 @@
|
|||||||
{% trans 'Currently no outposts exist. Click the button below to create one.' %}
|
{% trans 'Currently no outposts exist. Click the button below to create one.' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:outpost-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:outpost-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-c-button pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load humanize %}
|
{% load humanize %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
{% load admin_reflection %}
|
{% load admin_reflection %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<i class="pf-icon-integration"></i>
|
<i class="pf-icon-integration"></i>
|
||||||
{% trans 'Outpost Service-Connections' %}
|
{% trans 'Outpost Service-Connections' %}
|
||||||
</h1>
|
</h1>
|
||||||
<p>{% trans "Outpost Service-Connections define how passbook connects to external platforms to manage and deploy Outposts." %}</p>
|
<p>{% trans "Outpost Service-Connections define how authentik connects to external platforms to manage and deploy Outposts." %}</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="pf-c-page__main-section pf-m-no-padding-mobile">
|
<section class="pf-c-page__main-section pf-m-no-padding-mobile">
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
{% include 'partials/toolbar_search.html' %}
|
{% include 'partials/toolbar_search.html' %}
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-dropdown class="pf-c-dropdown">
|
<ak-dropdown class="pf-c-dropdown">
|
||||||
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
||||||
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
||||||
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
||||||
@ -30,7 +30,7 @@
|
|||||||
<ul class="pf-c-dropdown__menu" hidden>
|
<ul class="pf-c-dropdown__menu" hidden>
|
||||||
{% for type, name in types.items %}
|
{% for type, name in types.items %}
|
||||||
<li>
|
<li>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:outpost-service-connection-create' %}?type={{ type }}">
|
<ak-modal-button href="{% url 'authentik_admin:outpost-service-connection-create' %}?type={{ type }}">
|
||||||
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
||||||
{{ name|verbose_name }}<br>
|
{{ name|verbose_name }}<br>
|
||||||
<small>
|
<small>
|
||||||
@ -38,12 +38,12 @@
|
|||||||
</small>
|
</small>
|
||||||
</button>
|
</button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</pb-dropdown>
|
</ak-dropdown>
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -86,18 +86,18 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:outpost-service-connection-update' pk=sc.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:outpost-service-connection-update' pk=sc.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Edit' %}
|
{% trans 'Edit' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:outpost-service-connection-delete' pk=sc.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:outpost-service-connection-delete' pk=sc.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -125,7 +125,7 @@
|
|||||||
{% trans 'Currently no service connections exist. Click the button below to create one.' %}
|
{% trans 'Currently no service connections exist. Click the button below to create one.' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<pb-dropdown class="pf-c-dropdown">
|
<ak-dropdown class="pf-c-dropdown">
|
||||||
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
||||||
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
||||||
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
||||||
@ -133,7 +133,7 @@
|
|||||||
<ul class="pf-c-dropdown__menu" hidden>
|
<ul class="pf-c-dropdown__menu" hidden>
|
||||||
{% for type, name in types.items %}
|
{% for type, name in types.items %}
|
||||||
<li>
|
<li>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:outpost-service-connection-create' %}?type={{ type }}">
|
<ak-modal-button href="{% url 'authentik_admin:outpost-service-connection-create' %}?type={{ type }}">
|
||||||
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
||||||
{{ name|verbose_name }}<br>
|
{{ name|verbose_name }}<br>
|
||||||
<small>
|
<small>
|
||||||
@ -141,11 +141,11 @@
|
|||||||
</small>
|
</small>
|
||||||
</button>
|
</button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</pb-dropdown>
|
</ak-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pf-c-card__body">
|
<div class="pf-c-card__body">
|
||||||
<pb-admin-logins-chart url="{% url 'passbook_api:admin_metrics-list' %}"></pb-admin-logins-chart>
|
<ak-admin-logins-chart url="{% url 'authentik_api:admin_metrics-list' %}"></ak-admin-logins-chart>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pf-c-card pf-c-card-aggregate pf-l-gallery__item pf-m-4-col" style="grid-column-end: span 2;grid-row-end: span 3;">
|
<div class="pf-c-card pf-c-card-aggregate pf-l-gallery__item pf-m-4-col" style="grid-column-end: span 2;grid-row-end: span 3;">
|
||||||
@ -60,18 +60,18 @@
|
|||||||
<div class="pf-c-card__header-main">
|
<div class="pf-c-card__header-main">
|
||||||
<i class="pf-icon pf-icon-plugged"></i> {% trans 'Providers' %}
|
<i class="pf-icon pf-icon-plugged"></i> {% trans 'Providers' %}
|
||||||
</div>
|
</div>
|
||||||
<a href="{% url 'passbook_admin:providers' %}">
|
<a href="{% url 'authentik_admin:providers' %}">
|
||||||
<i class="fa fa-external-link-alt"> </i>
|
<i class="fa fa-external-link-alt"> </i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="pf-c-card__body">
|
<div class="pf-c-card__body">
|
||||||
{% if providers_without_application.exists %}
|
{% if providers_without_application.exists %}
|
||||||
<p class="pb-aggregate-card">
|
<p class="ak-aggregate-card">
|
||||||
<i class="fa fa-exclamation-triangle"></i> {{ provider_count }}
|
<i class="fa fa-exclamation-triangle"></i> {{ provider_count }}
|
||||||
</p>
|
</p>
|
||||||
<p>{% trans 'Warning: At least one Provider has no application assigned.' %}</p>
|
<p>{% trans 'Warning: At least one Provider has no application assigned.' %}</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="pb-aggregate-card">
|
<p class="ak-aggregate-card">
|
||||||
<i class="fa fa-check-circle"></i> {{ provider_count }}
|
<i class="fa fa-check-circle"></i> {{ provider_count }}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -83,18 +83,18 @@
|
|||||||
<div class="pf-c-card__header-main">
|
<div class="pf-c-card__header-main">
|
||||||
<i class="pf-icon pf-icon-infrastructure"></i> {% trans 'Policies' %}
|
<i class="pf-icon pf-icon-infrastructure"></i> {% trans 'Policies' %}
|
||||||
</div>
|
</div>
|
||||||
<a href="{% url 'passbook_admin:policies' %}">
|
<a href="{% url 'authentik_admin:policies' %}">
|
||||||
<i class="fa fa-external-link-alt"> </i>
|
<i class="fa fa-external-link-alt"> </i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="pf-c-card__body">
|
<div class="pf-c-card__body">
|
||||||
{% if policies_without_binding %}
|
{% if policies_without_binding %}
|
||||||
<p class="pb-aggregate-card">
|
<p class="ak-aggregate-card">
|
||||||
<i class="fa fa-exclamation-triangle"></i> {{ policy_count }}
|
<i class="fa fa-exclamation-triangle"></i> {{ policy_count }}
|
||||||
</p>
|
</p>
|
||||||
<p>{% trans 'Policies without binding exist.' %}</p>
|
<p>{% trans 'Policies without binding exist.' %}</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="pb-aggregate-card">
|
<p class="ak-aggregate-card">
|
||||||
<i class="fa fa-check-circle"></i> {{ policy_count }}
|
<i class="fa fa-check-circle"></i> {{ policy_count }}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -106,12 +106,12 @@
|
|||||||
<div class="pf-c-card__header-main">
|
<div class="pf-c-card__header-main">
|
||||||
<i class="pf-icon pf-icon-user"></i> {% trans 'Users' %}
|
<i class="pf-icon pf-icon-user"></i> {% trans 'Users' %}
|
||||||
</div>
|
</div>
|
||||||
<a href="{% url 'passbook_admin:users' %}">
|
<a href="{% url 'authentik_admin:users' %}">
|
||||||
<i class="fa fa-external-link-alt"> </i>
|
<i class="fa fa-external-link-alt"> </i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="pf-c-card__body">
|
<div class="pf-c-card__body">
|
||||||
<p class="pb-aggregate-card">
|
<p class="ak-aggregate-card">
|
||||||
<i class="fa fa-check-circle"></i> {{ user_count }}
|
<i class="fa fa-check-circle"></i> {{ user_count }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -122,12 +122,12 @@
|
|||||||
<div class="pf-c-card__header-main">
|
<div class="pf-c-card__header-main">
|
||||||
<i class="pf-icon pf-icon-bundle"></i> {% trans 'Version' %}
|
<i class="pf-icon pf-icon-bundle"></i> {% trans 'Version' %}
|
||||||
</div>
|
</div>
|
||||||
<a href="https://github.com/BeryJu/passbook/releases" target="_blank">
|
<a href="https://github.com/BeryJu/authentik/releases" target="_blank">
|
||||||
<i class="fa fa-external-link-alt"> </i>
|
<i class="fa fa-external-link-alt"> </i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="pf-c-card__body">
|
<div class="pf-c-card__body">
|
||||||
<p class="pb-aggregate-card">
|
<p class="ak-aggregate-card">
|
||||||
{% if version >= version_latest %}
|
{% if version >= version_latest %}
|
||||||
<i class="fa fa-check-circle"></i> {{ version }}
|
<i class="fa fa-check-circle"></i> {{ version }}
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -152,15 +152,15 @@
|
|||||||
<i class="pf-icon pf-icon-server"></i> {% trans 'Workers' %}
|
<i class="pf-icon pf-icon-server"></i> {% trans 'Workers' %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<fetch-fill-slot class="pf-c-card__body" url="{% url 'passbook_api:admin_overview-list' %}" key="worker_count">
|
<fetch-fill-slot class="pf-c-card__body" url="{% url 'authentik_api:admin_overview-list' %}" key="worker_count">
|
||||||
<div slot="value < 1">
|
<div slot="value < 1">
|
||||||
<p class="pb-aggregate-card">
|
<p class="ak-aggregate-card">
|
||||||
<i class="fa fa-exclamation-triangle"></i> <span data-value></span>
|
<i class="fa fa-exclamation-triangle"></i> <span data-value></span>
|
||||||
</p>
|
</p>
|
||||||
<p>{% trans 'No workers connected.' %}</p>
|
<p>{% trans 'No workers connected.' %}</p>
|
||||||
</div>
|
</div>
|
||||||
<div slot="value >= 1">
|
<div slot="value >= 1">
|
||||||
<p class="pb-aggregate-card">
|
<p class="ak-aggregate-card">
|
||||||
<i class="fa fa-check-circle"></i> <span data-value></span>
|
<i class="fa fa-check-circle"></i> <span data-value></span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -179,21 +179,21 @@
|
|||||||
<div class="pf-c-card__header-main">
|
<div class="pf-c-card__header-main">
|
||||||
<i class="pf-icon pf-icon-server"></i> {% trans 'Cached Policies' %}
|
<i class="pf-icon pf-icon-server"></i> {% trans 'Cached Policies' %}
|
||||||
</div>
|
</div>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:overview-clear-policy-cache' %}">
|
<ak-modal-button href="{% url 'authentik_admin:overview-clear-policy-cache' %}">
|
||||||
<a slot="trigger">
|
<a slot="trigger">
|
||||||
<i class="fa fa-trash"> </i>
|
<i class="fa fa-trash"> </i>
|
||||||
</a>
|
</a>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="pf-c-card__body">
|
<div class="pf-c-card__body">
|
||||||
{% if cached_policies < 1 %}
|
{% if cached_policies < 1 %}
|
||||||
<p class="pb-aggregate-card">
|
<p class="ak-aggregate-card">
|
||||||
<i class="fa fa-exclamation-triangle"></i> {{ cached_policies }}
|
<i class="fa fa-exclamation-triangle"></i> {{ cached_policies }}
|
||||||
</p>
|
</p>
|
||||||
<p>{% trans 'No policies cached. Users may experience slow response times.' %}</p>
|
<p>{% trans 'No policies cached. Users may experience slow response times.' %}</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="pb-aggregate-card">
|
<p class="ak-aggregate-card">
|
||||||
<i class="fa fa-check-circle"></i> {{ cached_policies }}
|
<i class="fa fa-check-circle"></i> {{ cached_policies }}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -205,21 +205,21 @@
|
|||||||
<div class="pf-c-card__header-main">
|
<div class="pf-c-card__header-main">
|
||||||
<i class="pf-icon pf-icon-server"></i> {% trans 'Cached Flows' %}
|
<i class="pf-icon pf-icon-server"></i> {% trans 'Cached Flows' %}
|
||||||
</div>
|
</div>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:overview-clear-flow-cache' %}">
|
<ak-modal-button href="{% url 'authentik_admin:overview-clear-flow-cache' %}">
|
||||||
<a slot="trigger">
|
<a slot="trigger">
|
||||||
<i class="fa fa-trash"> </i>
|
<i class="fa fa-trash"> </i>
|
||||||
</a>
|
</a>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="pf-c-card__body">
|
<div class="pf-c-card__body">
|
||||||
{% if cached_flows < 1 %}
|
{% if cached_flows < 1 %}
|
||||||
<p class="pb-aggregate-card">
|
<p class="ak-aggregate-card">
|
||||||
<span class="fa fa-exclamation-triangle"></span> {{ cached_flows }}
|
<span class="fa fa-exclamation-triangle"></span> {{ cached_flows }}
|
||||||
</p>
|
</p>
|
||||||
<p>{% trans 'No flows cached.' %}</p>
|
<p>{% trans 'No flows cached.' %}</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="pb-aggregate-card">
|
<p class="ak-aggregate-card">
|
||||||
<i class="fa fa-check-circle"></i> {{ cached_flows }}
|
<i class="fa fa-check-circle"></i> {{ cached_flows }}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "administration/base.html" %}
|
{% extends "administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="pf-c-page__main-section pf-m-light">
|
<section class="pf-c-page__main-section pf-m-light">
|
||||||
@ -20,7 +20,7 @@
|
|||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
{% include 'partials/toolbar_search.html' %}
|
{% include 'partials/toolbar_search.html' %}
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-dropdown class="pf-c-dropdown">
|
<ak-dropdown class="pf-c-dropdown">
|
||||||
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
||||||
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
||||||
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
||||||
@ -28,7 +28,7 @@
|
|||||||
<ul class="pf-c-dropdown__menu" hidden>
|
<ul class="pf-c-dropdown__menu" hidden>
|
||||||
{% for type, name in types.items %}
|
{% for type, name in types.items %}
|
||||||
<li>
|
<li>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:policy-create' %}?type={{ type }}">
|
<ak-modal-button href="{% url 'authentik_admin:policy-create' %}?type={{ type }}">
|
||||||
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
||||||
{{ name|verbose_name }}<br>
|
{{ name|verbose_name }}<br>
|
||||||
<small>
|
<small>
|
||||||
@ -36,11 +36,11 @@
|
|||||||
</small>
|
</small>
|
||||||
</button>
|
</button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</pb-dropdown>
|
</ak-dropdown>
|
||||||
</div>
|
</div>
|
||||||
{% include 'partials/pagination.html' %}
|
{% include 'partials/pagination.html' %}
|
||||||
</div>
|
</div>
|
||||||
@ -74,24 +74,24 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:policy-update' pk=policy.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:policy-update' pk=policy.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Edit' %}
|
{% trans 'Edit' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:policy-test' pk=policy.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:policy-test' pk=policy.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-tertiary">
|
<ak-spinner-button slot="trigger" class="pf-m-tertiary">
|
||||||
{% trans 'Test' %}
|
{% trans 'Test' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:policy-delete' pk=policy.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:policy-delete' pk=policy.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -119,7 +119,7 @@
|
|||||||
{% trans 'Currently no policies exist. Click the button below to create one.' %}
|
{% trans 'Currently no policies exist. Click the button below to create one.' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<pb-dropdown class="pf-c-dropdown">
|
<ak-dropdown class="pf-c-dropdown">
|
||||||
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
||||||
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
||||||
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
||||||
@ -127,7 +127,7 @@
|
|||||||
<ul class="pf-c-dropdown__menu" hidden>
|
<ul class="pf-c-dropdown__menu" hidden>
|
||||||
{% for type, name in types.items %}
|
{% for type, name in types.items %}
|
||||||
<li>
|
<li>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:policy-create' %}?type={{ type }}">
|
<ak-modal-button href="{% url 'authentik_admin:policy-create' %}?type={{ type }}">
|
||||||
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
||||||
{{ name|verbose_name }}<br>
|
{{ name|verbose_name }}<br>
|
||||||
<small>
|
<small>
|
||||||
@ -135,11 +135,11 @@
|
|||||||
</small>
|
</small>
|
||||||
</button>
|
</button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</pb-dropdown>
|
</ak-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "administration/base.html" %}
|
{% extends "administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="pf-c-page__main-section pf-m-light">
|
<section class="pf-c-page__main-section pf-m-light">
|
||||||
@ -19,13 +19,13 @@
|
|||||||
<div class="pf-c-toolbar">
|
<div class="pf-c-toolbar">
|
||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-modal-button href="{% url 'passbook_admin:policy-binding-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:policy-binding-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -74,18 +74,18 @@
|
|||||||
<div>{{ binding.timeout }}</div>
|
<div>{{ binding.timeout }}</div>
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:policy-binding-update' pk=binding.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:policy-binding-update' pk=binding.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Edit' %}
|
{% trans 'Edit' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:policy-binding-delete' pk=binding.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:policy-binding-delete' pk=binding.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -105,12 +105,12 @@
|
|||||||
<div class="pf-c-empty-state__body">
|
<div class="pf-c-empty-state__body">
|
||||||
{% trans 'Currently no policy bindings exist. Click the button below to create one.' %}
|
{% trans 'Currently no policy bindings exist. Click the button below to create one.' %}
|
||||||
</div>
|
</div>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:policy-binding-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:policy-binding-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "administration/base.html" %}
|
{% extends "administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="pf-c-page__main-section pf-m-light">
|
<section class="pf-c-page__main-section pf-m-light">
|
||||||
@ -10,7 +10,7 @@
|
|||||||
<i class="pf-icon pf-icon-blueprint"></i>
|
<i class="pf-icon pf-icon-blueprint"></i>
|
||||||
{% trans 'Property Mappings' %}
|
{% trans 'Property Mappings' %}
|
||||||
</h1>
|
</h1>
|
||||||
<p>{% trans "Control how passbook exposes and interprets information." %}
|
<p>{% trans "Control how authentik exposes and interprets information." %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
{% include 'partials/toolbar_search.html' %}
|
{% include 'partials/toolbar_search.html' %}
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-dropdown class="pf-c-dropdown">
|
<ak-dropdown class="pf-c-dropdown">
|
||||||
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
||||||
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
||||||
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<ul class="pf-c-dropdown__menu" hidden>
|
<ul class="pf-c-dropdown__menu" hidden>
|
||||||
{% for type, name in types.items %}
|
{% for type, name in types.items %}
|
||||||
<li>
|
<li>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:property-mapping-create' %}?type={{ type }}">
|
<ak-modal-button href="{% url 'authentik_admin:property-mapping-create' %}?type={{ type }}">
|
||||||
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
||||||
{{ name|verbose_name }}<br>
|
{{ name|verbose_name }}<br>
|
||||||
<small>
|
<small>
|
||||||
@ -37,12 +37,12 @@
|
|||||||
</small>
|
</small>
|
||||||
</button>
|
</button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</pb-dropdown>
|
</ak-dropdown>
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -71,18 +71,18 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:property-mapping-update' pk=property_mapping.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:property-mapping-update' pk=property_mapping.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Edit' %}
|
{% trans 'Edit' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:property-mapping-delete' pk=property_mapping.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:property-mapping-delete' pk=property_mapping.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -110,7 +110,7 @@
|
|||||||
{% trans 'Currently no property mappings exist. Click the button below to create one.' %}
|
{% trans 'Currently no property mappings exist. Click the button below to create one.' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<pb-dropdownpb-dropdown class="pf-c-dropdown">
|
<ak-dropdown class="pf-c-dropdown">
|
||||||
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
||||||
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
||||||
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
||||||
@ -118,7 +118,7 @@
|
|||||||
<ul class="pf-c-dropdown__menu" hidden>
|
<ul class="pf-c-dropdown__menu" hidden>
|
||||||
{% for type, name in types.items %}
|
{% for type, name in types.items %}
|
||||||
<li>
|
<li>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:property-mapping-create' %}?type={{ type }}">
|
<ak-modal-button href="{% url 'authentik_admin:property-mapping-create' %}?type={{ type }}">
|
||||||
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
||||||
{{ name|verbose_name }}<br>
|
{{ name|verbose_name }}<br>
|
||||||
<small>
|
<small>
|
||||||
@ -126,11 +126,11 @@
|
|||||||
</small>
|
</small>
|
||||||
</button>
|
</button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</pb-dropdown>
|
</ak-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "administration/base.html" %}
|
{% extends "administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
{% load admin_reflection %}
|
{% load admin_reflection %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
{% include 'partials/toolbar_search.html' %}
|
{% include 'partials/toolbar_search.html' %}
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-dropdown class="pf-c-dropdown">
|
<ak-dropdown class="pf-c-dropdown">
|
||||||
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
||||||
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
||||||
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
||||||
@ -30,7 +30,7 @@
|
|||||||
<ul class="pf-c-dropdown__menu" hidden>
|
<ul class="pf-c-dropdown__menu" hidden>
|
||||||
{% for type, name in types.items %}
|
{% for type, name in types.items %}
|
||||||
<li>
|
<li>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:provider-create' %}?type={{ type }}">
|
<ak-modal-button href="{% url 'authentik_admin:provider-create' %}?type={{ type }}">
|
||||||
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
||||||
{{ name|verbose_name }}<br>
|
{{ name|verbose_name }}<br>
|
||||||
<small>
|
<small>
|
||||||
@ -38,12 +38,12 @@
|
|||||||
</small>
|
</small>
|
||||||
</button>
|
</button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</pb-dropdown>
|
</ak-dropdown>
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -83,21 +83,21 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:provider-update' pk=provider.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:provider-update' pk=provider.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Edit' %}
|
{% trans 'Edit' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:provider-delete' pk=provider.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:provider-delete' pk=provider.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
{% get_links provider as links %}
|
{% get_links provider as links %}
|
||||||
{% for name, href in links.items %}
|
{% for name, href in links.items %}
|
||||||
<a class="pf-c-button pf-m-tertiary pb-root-link" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
<a class="pf-c-button pf-m-tertiary ak-root-link" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% get_htmls provider as htmls %}
|
{% get_htmls provider as htmls %}
|
||||||
{% for html in htmls %}
|
{% for html in htmls %}
|
||||||
@ -130,7 +130,7 @@
|
|||||||
{% trans 'Currently no providers exist. Click the button below to create one.' %}
|
{% trans 'Currently no providers exist. Click the button below to create one.' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<pb-dropdown class="pf-c-dropdown">
|
<ak-dropdown class="pf-c-dropdown">
|
||||||
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
||||||
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
||||||
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
||||||
@ -138,7 +138,7 @@
|
|||||||
<ul class="pf-c-dropdown__menu" hidden>
|
<ul class="pf-c-dropdown__menu" hidden>
|
||||||
{% for type, name in types.items %}
|
{% for type, name in types.items %}
|
||||||
<li>
|
<li>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:provider-create' %}?type={{ type }}">
|
<ak-modal-button href="{% url 'authentik_admin:provider-create' %}?type={{ type }}">
|
||||||
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
||||||
{{ name|verbose_name }}<br>
|
{{ name|verbose_name }}<br>
|
||||||
<small>
|
<small>
|
||||||
@ -146,11 +146,11 @@
|
|||||||
</small>
|
</small>
|
||||||
</button>
|
</button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</pb-dropdown>
|
</ak-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "administration/base.html" %}
|
{% extends "administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
{% load admin_reflection %}
|
{% load admin_reflection %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
@ -11,7 +11,7 @@
|
|||||||
<i class="pf-icon pf-icon-middleware"></i>
|
<i class="pf-icon pf-icon-middleware"></i>
|
||||||
{% trans 'Source' %}
|
{% trans 'Source' %}
|
||||||
</h1>
|
</h1>
|
||||||
<p>{% trans "External Sources which can be used to get Identities into passbook, for example Social Providers like Twiter and GitHub or Enterprise Providers like ADFS and LDAP." %}
|
<p>{% trans "External Sources which can be used to get Identities into authentik, for example Social Providers like Twiter and GitHub or Enterprise Providers like ADFS and LDAP." %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
{% include 'partials/toolbar_search.html' %}
|
{% include 'partials/toolbar_search.html' %}
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-dropdown class="pf-c-dropdown">
|
<ak-dropdown class="pf-c-dropdown">
|
||||||
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
||||||
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
||||||
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
||||||
@ -30,7 +30,7 @@
|
|||||||
<ul class="pf-c-dropdown__menu" hidden>
|
<ul class="pf-c-dropdown__menu" hidden>
|
||||||
{% for type, name in types.items %}
|
{% for type, name in types.items %}
|
||||||
<li>
|
<li>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:source-create' %}?type={{ type }}">
|
<ak-modal-button href="{% url 'authentik_admin:source-create' %}?type={{ type }}">
|
||||||
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
||||||
{{ name|verbose_name }}<br>
|
{{ name|verbose_name }}<br>
|
||||||
<small>
|
<small>
|
||||||
@ -38,12 +38,12 @@
|
|||||||
</small>
|
</small>
|
||||||
</button>
|
</button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</pb-dropdown>
|
</ak-dropdown>
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -81,21 +81,21 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:source-update' pk=source.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:source-update' pk=source.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Edit' %}
|
{% trans 'Edit' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:source-delete' pk=source.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:source-delete' pk=source.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
{% get_links source as links %}
|
{% get_links source as links %}
|
||||||
{% for name, href in links %}
|
{% for name, href in links %}
|
||||||
<a class="pf-c-button pf-m-tertiary pb-root-link" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
<a class="pf-c-button pf-m-tertiary ak-root-link" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -124,7 +124,7 @@
|
|||||||
{% trans 'Currently no sources exist. Click the button below to create one.' %}
|
{% trans 'Currently no sources exist. Click the button below to create one.' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<pb-dropdown class="pf-c-dropdown">
|
<ak-dropdown class="pf-c-dropdown">
|
||||||
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
||||||
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
||||||
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
||||||
@ -132,7 +132,7 @@
|
|||||||
<ul class="pf-c-dropdown__menu" hidden>
|
<ul class="pf-c-dropdown__menu" hidden>
|
||||||
{% for type, name in types.items %}
|
{% for type, name in types.items %}
|
||||||
<li>
|
<li>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:source-create' %}?type={{ type }}">
|
<ak-modal-button href="{% url 'authentik_admin:source-create' %}?type={{ type }}">
|
||||||
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
||||||
{{ name|verbose_name }}<br>
|
{{ name|verbose_name }}<br>
|
||||||
<small>
|
<small>
|
||||||
@ -140,11 +140,11 @@
|
|||||||
</small>
|
</small>
|
||||||
</button>
|
</button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</pb-dropdown>
|
</ak-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "administration/base.html" %}
|
{% extends "administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
{% load admin_reflection %}
|
{% load admin_reflection %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
{% include 'partials/toolbar_search.html' %}
|
{% include 'partials/toolbar_search.html' %}
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-dropdown class="pf-c-dropdown">
|
<ak-dropdown class="pf-c-dropdown">
|
||||||
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
||||||
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
||||||
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<ul class="pf-c-dropdown__menu" hidden>
|
<ul class="pf-c-dropdown__menu" hidden>
|
||||||
{% for type, name in types.items %}
|
{% for type, name in types.items %}
|
||||||
<li>
|
<li>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:stage-create' %}?type={{ type }}">
|
<ak-modal-button href="{% url 'authentik_admin:stage-create' %}?type={{ type }}">
|
||||||
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
||||||
{{ name|verbose_name }}<br>
|
{{ name|verbose_name }}<br>
|
||||||
<small>
|
<small>
|
||||||
@ -37,12 +37,12 @@
|
|||||||
</small>
|
</small>
|
||||||
</button>
|
</button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</pb-dropdown>
|
</ak-dropdown>
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -76,21 +76,21 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:stage-update' pk=stage.stage_uuid %}">
|
<ak-modal-button href="{% url 'authentik_admin:stage-update' pk=stage.stage_uuid %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Edit' %}
|
{% trans 'Edit' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:stage-delete' pk=stage.stage_uuid %}">
|
<ak-modal-button href="{% url 'authentik_admin:stage-delete' pk=stage.stage_uuid %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
{% get_links stage as links %}
|
{% get_links stage as links %}
|
||||||
{% for name, href in links.items %}
|
{% for name, href in links.items %}
|
||||||
<a class="pf-c-button pf-m-tertiary pb-root-link" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
<a class="pf-c-button pf-m-tertiary ak-root-link" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -119,7 +119,7 @@
|
|||||||
{% trans 'Currently no stages exist. Click the button below to create one.' %}
|
{% trans 'Currently no stages exist. Click the button below to create one.' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<pb-dropdown class="pf-c-dropdown">
|
<ak-dropdown class="pf-c-dropdown">
|
||||||
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
<button class="pf-m-primary pf-c-dropdown__toggle" type="button">
|
||||||
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
<span class="pf-c-dropdown__toggle-text">{% trans 'Create' %}</span>
|
||||||
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
<i class="fas fa-caret-down pf-c-dropdown__toggle-icon" aria-hidden="true"></i>
|
||||||
@ -127,7 +127,7 @@
|
|||||||
<ul class="pf-c-dropdown__menu" hidden>
|
<ul class="pf-c-dropdown__menu" hidden>
|
||||||
{% for type, name in types.items %}
|
{% for type, name in types.items %}
|
||||||
<li>
|
<li>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:stage-create' %}?type={{ type }}">
|
<ak-modal-button href="{% url 'authentik_admin:stage-create' %}?type={{ type }}">
|
||||||
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
<button slot="trigger" class="pf-c-dropdown__menu-item">
|
||||||
{{ name|verbose_name }}<br>
|
{{ name|verbose_name }}<br>
|
||||||
<small>
|
<small>
|
||||||
@ -135,11 +135,11 @@
|
|||||||
</small>
|
</small>
|
||||||
</button>
|
</button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</pb-dropdown>
|
</ak-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "administration/base.html" %}
|
{% extends "administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="pf-c-page__main-section pf-m-light">
|
<section class="pf-c-page__main-section pf-m-light">
|
||||||
@ -19,13 +19,13 @@
|
|||||||
<div class="pf-c-toolbar">
|
<div class="pf-c-toolbar">
|
||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-modal-button href="{% url 'passbook_admin:stage-binding-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:stage-binding-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -80,18 +80,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:stage-binding-update' pk=binding.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:stage-binding-update' pk=binding.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Update' %}
|
{% trans 'Update' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:stage-binding-delete' pk=binding.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:stage-binding-delete' pk=binding.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -111,12 +111,12 @@
|
|||||||
<div class="pf-c-empty-state__body">
|
<div class="pf-c-empty-state__body">
|
||||||
{% trans 'Currently no flow-stage bindings exist. Click the button below to create one.' %}
|
{% trans 'Currently no flow-stage bindings exist. Click the button below to create one.' %}
|
||||||
</div>
|
</div>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:stage-binding-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:stage-binding-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "administration/base.html" %}
|
{% extends "administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="pf-c-page__main-section pf-m-light">
|
<section class="pf-c-page__main-section pf-m-light">
|
||||||
@ -21,13 +21,13 @@
|
|||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
{% include 'partials/toolbar_search.html' %}
|
{% include 'partials/toolbar_search.html' %}
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-modal-button href="{% url 'passbook_admin:stage-invitation-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:stage-invitation-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -56,12 +56,12 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:stage-invitation-delete' pk=invitation.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:stage-invitation-delete' pk=invitation.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -89,12 +89,12 @@
|
|||||||
{% trans 'Currently no invitations exist. Click the button below to create one.' %}
|
{% trans 'Currently no invitations exist. Click the button below to create one.' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:stage-invitation-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:stage-invitation-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "administration/base.html" %}
|
{% extends "administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
{% load admin_reflection %}
|
{% load admin_reflection %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
@ -21,13 +21,13 @@
|
|||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
{% include 'partials/toolbar_search.html' %}
|
{% include 'partials/toolbar_search.html' %}
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-modal-button href="{% url 'passbook_admin:stage-prompt-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:stage-prompt-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -78,21 +78,21 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:stage-prompt-update' pk=prompt.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:stage-prompt-update' pk=prompt.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Update' %}
|
{% trans 'Update' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:stage-prompt-delete' pk=prompt.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:stage-prompt-delete' pk=prompt.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
{% get_links prompt as links %}
|
{% get_links prompt as links %}
|
||||||
{% for name, href in links.items %}
|
{% for name, href in links.items %}
|
||||||
<a class="pf-c-button pf-m-tertiary pb-root-link" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
<a class="pf-c-button pf-m-tertiary ak-root-link" href="{{ href }}?back={{ request.get_full_path }}">{% trans name %}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -121,7 +121,7 @@
|
|||||||
{% trans 'Currently no stage prompts exist. Click the button below to create one.' %}
|
{% trans 'Currently no stage prompts exist. Click the button below to create one.' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<a href="{% url 'passbook_admin:stage-prompt-create' %}?back={{ request.get_full_path }}" class="pf-c-button pf-m-primary" type="button">{% trans 'Create' %}</a>
|
<a href="{% url 'authentik_admin:stage-prompt-create' %}?back={{ request.get_full_path }}" class="pf-c-button pf-m-primary" type="button">{% trans 'Create' %}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load humanize %}
|
{% load humanize %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="pf-c-page__main-section pf-m-light">
|
<section class="pf-c-page__main-section pf-m-light">
|
||||||
@ -11,14 +11,14 @@
|
|||||||
<i class="pf-icon pf-icon-automation"></i>
|
<i class="pf-icon pf-icon-automation"></i>
|
||||||
{% trans 'System Tasks' %}
|
{% trans 'System Tasks' %}
|
||||||
</h1>
|
</h1>
|
||||||
<p>{% trans "Long-running operations which passbook executes in the background." %}</p>
|
<p>{% trans "Long-running operations which authentik executes in the background." %}</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="pf-c-page__main-section pf-m-no-padding-mobile">
|
<section class="pf-c-page__main-section pf-m-no-padding-mobile">
|
||||||
<div class="pf-c-card">
|
<div class="pf-c-card">
|
||||||
<div class="pf-c-toolbar">
|
<div class="pf-c-toolbar">
|
||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -71,9 +71,9 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-action-button url="{% url 'passbook_api:admin_system_tasks-retry' pk=task.task_name %}">
|
<ak-action-button url="{% url 'authentik_api:admin_system_tasks-retry' pk=task.task_name %}">
|
||||||
{% trans 'Retry Task' %}
|
{% trans 'Retry Task' %}
|
||||||
</pb-action-button>
|
</ak-action-button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "administration/base.html" %}
|
{% extends "administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="pf-c-page__main-section pf-m-light">
|
<section class="pf-c-page__main-section pf-m-light">
|
||||||
@ -10,7 +10,7 @@
|
|||||||
<i class="pf-icon pf-icon-security"></i>
|
<i class="pf-icon pf-icon-security"></i>
|
||||||
{% trans 'Tokens' %}
|
{% trans 'Tokens' %}
|
||||||
</h1>
|
</h1>
|
||||||
<p>{% trans "Tokens are used throughout passbook for Email validation stages, Recovery keys and API access." %}</p>
|
<p>{% trans "Tokens are used throughout authentik for Email validation stages, Recovery keys and API access." %}</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="pf-c-page__main-section pf-m-no-padding-mobile">
|
<section class="pf-c-page__main-section pf-m-no-padding-mobile">
|
||||||
@ -58,15 +58,15 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:token-delete' pk=token.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:token-delete' pk=token.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-danger">
|
<ak-spinner-button slot="trigger" class="pf-m-danger">
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<pb-token-copy-button identifier="{{ token.identifier }}">
|
<ak-token-copy-button identifier="{{ token.identifier }}">
|
||||||
{% trans 'Copy token' %}
|
{% trans 'Copy token' %}
|
||||||
</pb-token-copy-button>
|
</ak-token-copy-button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "administration/base.html" %}
|
{% extends "administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="pf-c-page__main-section pf-m-light">
|
<section class="pf-c-page__main-section pf-m-light">
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "administration/base.html" %}
|
{% extends "administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="pf-c-page__main-section pf-m-light">
|
<section class="pf-c-page__main-section pf-m-light">
|
||||||
@ -19,13 +19,13 @@
|
|||||||
<div class="pf-c-toolbar__content">
|
<div class="pf-c-toolbar__content">
|
||||||
{% include 'partials/toolbar_search.html' %}
|
{% include 'partials/toolbar_search.html' %}
|
||||||
<div class="pf-c-toolbar__bulk-select">
|
<div class="pf-c-toolbar__bulk-select">
|
||||||
<pb-modal-button href="{% url 'passbook_admin:user-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:user-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
<button role="pb-refresh" class="pf-c-button pf-m-primary">
|
<button role="ak-refresh" class="pf-c-button pf-m-primary">
|
||||||
{% trans 'Refresh' %}
|
{% trans 'Refresh' %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -61,29 +61,29 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:user-update' pk=user.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:user-update' pk=user.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-secondary">
|
<ak-spinner-button slot="trigger" class="pf-m-secondary">
|
||||||
{% trans 'Edit' %}
|
{% trans 'Edit' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
{% if user.is_active %}
|
{% if user.is_active %}
|
||||||
<pb-modal-button href="{% url 'passbook_admin:user-disable' pk=user.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:user-disable' pk=user.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-warning">
|
<ak-spinner-button slot="trigger" class="pf-m-warning">
|
||||||
{% trans 'Disable' %}
|
{% trans 'Disable' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
{% else %}
|
{% else %}
|
||||||
<pb-modal-button href="{% url 'passbook_admin:user-delete' pk=user.pk %}">
|
<ak-modal-button href="{% url 'authentik_admin:user-delete' pk=user.pk %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Enable' %}
|
{% trans 'Enable' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="pf-c-button pf-m-tertiary pb-root-link" href="{% url 'passbook_admin:user-password-reset' pk=user.pk %}?back={{ request.get_full_path }}">{% trans 'Reset Password' %}</a>
|
<a class="pf-c-button pf-m-tertiary ak-root-link" href="{% url 'authentik_admin:user-password-reset' pk=user.pk %}?back={{ request.get_full_path }}">{% trans 'Reset Password' %}</a>
|
||||||
<a class="pf-c-button pf-m-tertiary pb-root-link" href="{% url 'passbook_core:impersonate-init' user_id=user.pk %}">{% trans 'Impersonate' %}</a>
|
<a class="pf-c-button pf-m-tertiary ak-root-link" href="{% url 'authentik_core:impersonate-init' user_id=user.pk %}">{% trans 'Impersonate' %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -111,12 +111,12 @@
|
|||||||
{% trans 'Currently no users exist. How did you even get here.' %}
|
{% trans 'Currently no users exist. How did you even get here.' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<pb-modal-button href="{% url 'passbook_admin:user-create' %}">
|
<ak-modal-button href="{% url 'authentik_admin:user-create' %}">
|
||||||
<pb-spinner-button slot="trigger" class="pf-m-primary">
|
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||||
{% trans 'Create' %}
|
{% trans 'Create' %}
|
||||||
</pb-spinner-button>
|
</ak-spinner-button>
|
||||||
<div slot="modal"></div>
|
<div slot="modal"></div>
|
||||||
</pb-modal-button>
|
</ak-modal-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
1
authentik/admin/templates/fields/codemirror.html
Normal file
1
authentik/admin/templates/fields/codemirror.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<ak-codemirror mode="{{ widget.attrs.mode }}"><textarea class="pf-c-form-control" name="{{ widget.name }}">{% if widget.value %}{{ widget.value }}{% endif %}</textarea></ak-codemirror>
|
@ -1,6 +1,6 @@
|
|||||||
{% extends base_template|default:"generic/form.html" %}
|
{% extends base_template|default:"generic/form.html" %}
|
||||||
|
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block above_form %}
|
{% block above_form %}
|
@ -1,7 +1,7 @@
|
|||||||
{% extends container_template|default:"administration/base.html" %}
|
{% extends container_template|default:"administration/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
@ -1,6 +1,6 @@
|
|||||||
{% extends base_template|default:"generic/form.html" %}
|
{% extends base_template|default:"generic/form.html" %}
|
||||||
|
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block above_form %}
|
{% block above_form %}
|
@ -1,6 +1,6 @@
|
|||||||
{% extends base_template|default:"generic/form.html" %}
|
{% extends base_template|default:"generic/form.html" %}
|
||||||
|
|
||||||
{% load passbook_utils %}
|
{% load authentik_utils %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block above_form %}
|
{% block above_form %}
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook admin templatetags"""
|
"""authentik admin templatetags"""
|
||||||
from django import template
|
from django import template
|
||||||
from django.db.models import Model
|
from django.db.models import Model
|
||||||
from django.utils.html import mark_safe
|
from django.utils.html import mark_safe
|
@ -7,9 +7,9 @@ from django.shortcuts import reverse
|
|||||||
from django.test import Client, TestCase
|
from django.test import Client, TestCase
|
||||||
from django.urls.exceptions import NoReverseMatch
|
from django.urls.exceptions import NoReverseMatch
|
||||||
|
|
||||||
from passbook.admin.urls import urlpatterns
|
from authentik.admin.urls import urlpatterns
|
||||||
from passbook.core.models import Group, User
|
from authentik.core.models import Group, User
|
||||||
from passbook.lib.utils.reflection import get_apps
|
from authentik.lib.utils.reflection import get_apps
|
||||||
|
|
||||||
|
|
||||||
class TestAdmin(TestCase):
|
class TestAdmin(TestCase):
|
||||||
@ -17,7 +17,7 @@ class TestAdmin(TestCase):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.user = User.objects.create_user(username="test")
|
self.user = User.objects.create_user(username="test")
|
||||||
self.user.pb_groups.add(Group.objects.filter(is_superuser=True).first())
|
self.user.ak_groups.add(Group.objects.filter(is_superuser=True).first())
|
||||||
self.user.save()
|
self.user.save()
|
||||||
self.client = Client()
|
self.client = Client()
|
||||||
self.client.force_login(self.user)
|
self.client.force_login(self.user)
|
||||||
@ -28,7 +28,7 @@ def generic_view_tester(view_name: str) -> Callable:
|
|||||||
|
|
||||||
def tester(self: TestAdmin):
|
def tester(self: TestAdmin):
|
||||||
try:
|
try:
|
||||||
full_url = reverse(f"passbook_admin:{view_name}")
|
full_url = reverse(f"authentik_admin:{view_name}")
|
||||||
response = self.client.get(full_url)
|
response = self.client.get(full_url)
|
||||||
self.assertTrue(response.status_code < 500)
|
self.assertTrue(response.status_code < 500)
|
||||||
except NoReverseMatch:
|
except NoReverseMatch:
|
@ -1,7 +1,7 @@
|
|||||||
"""passbook URL Configuration"""
|
"""authentik URL Configuration"""
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
|
|
||||||
from passbook.admin.views import (
|
from authentik.admin.views import (
|
||||||
applications,
|
applications,
|
||||||
certificate_key_pair,
|
certificate_key_pair,
|
||||||
flows,
|
flows,
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook Application administration"""
|
"""authentik Application administration"""
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.contrib.auth.mixins import (
|
from django.contrib.auth.mixins import (
|
||||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||||
@ -9,15 +9,15 @@ from django.utils.translation import gettext as _
|
|||||||
from django.views.generic import ListView, UpdateView
|
from django.views.generic import ListView, UpdateView
|
||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
|
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
SearchListMixin,
|
SearchListMixin,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.core.forms.applications import ApplicationForm
|
from authentik.core.forms.applications import ApplicationForm
|
||||||
from passbook.core.models import Application
|
from authentik.core.models import Application
|
||||||
from passbook.lib.views import CreateAssignPermView
|
from authentik.lib.views import CreateAssignPermView
|
||||||
|
|
||||||
|
|
||||||
class ApplicationListView(
|
class ApplicationListView(
|
||||||
@ -30,7 +30,7 @@ class ApplicationListView(
|
|||||||
"""Show list of all applications"""
|
"""Show list of all applications"""
|
||||||
|
|
||||||
model = Application
|
model = Application
|
||||||
permission_required = "passbook_core.view_application"
|
permission_required = "authentik_core.view_application"
|
||||||
ordering = "name"
|
ordering = "name"
|
||||||
template_name = "administration/application/list.html"
|
template_name = "administration/application/list.html"
|
||||||
|
|
||||||
@ -55,10 +55,10 @@ class ApplicationCreateView(
|
|||||||
|
|
||||||
model = Application
|
model = Application
|
||||||
form_class = ApplicationForm
|
form_class = ApplicationForm
|
||||||
permission_required = "passbook_core.add_application"
|
permission_required = "authentik_core.add_application"
|
||||||
|
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
success_url = reverse_lazy("passbook_admin:applications")
|
success_url = reverse_lazy("authentik_admin:applications")
|
||||||
success_message = _("Successfully created Application")
|
success_message = _("Successfully created Application")
|
||||||
|
|
||||||
|
|
||||||
@ -73,10 +73,10 @@ class ApplicationUpdateView(
|
|||||||
|
|
||||||
model = Application
|
model = Application
|
||||||
form_class = ApplicationForm
|
form_class = ApplicationForm
|
||||||
permission_required = "passbook_core.change_application"
|
permission_required = "authentik_core.change_application"
|
||||||
|
|
||||||
template_name = "generic/update.html"
|
template_name = "generic/update.html"
|
||||||
success_url = reverse_lazy("passbook_admin:applications")
|
success_url = reverse_lazy("authentik_admin:applications")
|
||||||
success_message = _("Successfully updated Application")
|
success_message = _("Successfully updated Application")
|
||||||
|
|
||||||
|
|
||||||
@ -86,8 +86,8 @@ class ApplicationDeleteView(
|
|||||||
"""Delete application"""
|
"""Delete application"""
|
||||||
|
|
||||||
model = Application
|
model = Application
|
||||||
permission_required = "passbook_core.delete_application"
|
permission_required = "authentik_core.delete_application"
|
||||||
|
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:applications")
|
success_url = reverse_lazy("authentik_admin:applications")
|
||||||
success_message = _("Successfully deleted Application")
|
success_message = _("Successfully deleted Application")
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook CertificateKeyPair administration"""
|
"""authentik CertificateKeyPair administration"""
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.contrib.auth.mixins import (
|
from django.contrib.auth.mixins import (
|
||||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||||
@ -9,15 +9,15 @@ from django.utils.translation import gettext as _
|
|||||||
from django.views.generic import ListView, UpdateView
|
from django.views.generic import ListView, UpdateView
|
||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
|
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
SearchListMixin,
|
SearchListMixin,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.crypto.forms import CertificateKeyPairForm
|
from authentik.crypto.forms import CertificateKeyPairForm
|
||||||
from passbook.crypto.models import CertificateKeyPair
|
from authentik.crypto.models import CertificateKeyPair
|
||||||
from passbook.lib.views import CreateAssignPermView
|
from authentik.lib.views import CreateAssignPermView
|
||||||
|
|
||||||
|
|
||||||
class CertificateKeyPairListView(
|
class CertificateKeyPairListView(
|
||||||
@ -30,7 +30,7 @@ class CertificateKeyPairListView(
|
|||||||
"""Show list of all keypairs"""
|
"""Show list of all keypairs"""
|
||||||
|
|
||||||
model = CertificateKeyPair
|
model = CertificateKeyPair
|
||||||
permission_required = "passbook_crypto.view_certificatekeypair"
|
permission_required = "authentik_crypto.view_certificatekeypair"
|
||||||
ordering = "name"
|
ordering = "name"
|
||||||
template_name = "administration/certificatekeypair/list.html"
|
template_name = "administration/certificatekeypair/list.html"
|
||||||
|
|
||||||
@ -48,10 +48,10 @@ class CertificateKeyPairCreateView(
|
|||||||
|
|
||||||
model = CertificateKeyPair
|
model = CertificateKeyPair
|
||||||
form_class = CertificateKeyPairForm
|
form_class = CertificateKeyPairForm
|
||||||
permission_required = "passbook_crypto.add_certificatekeypair"
|
permission_required = "authentik_crypto.add_certificatekeypair"
|
||||||
|
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
success_url = reverse_lazy("passbook_admin:certificate_key_pair")
|
success_url = reverse_lazy("authentik_admin:certificate_key_pair")
|
||||||
success_message = _("Successfully created CertificateKeyPair")
|
success_message = _("Successfully created CertificateKeyPair")
|
||||||
|
|
||||||
|
|
||||||
@ -66,10 +66,10 @@ class CertificateKeyPairUpdateView(
|
|||||||
|
|
||||||
model = CertificateKeyPair
|
model = CertificateKeyPair
|
||||||
form_class = CertificateKeyPairForm
|
form_class = CertificateKeyPairForm
|
||||||
permission_required = "passbook_crypto.change_certificatekeypair"
|
permission_required = "authentik_crypto.change_certificatekeypair"
|
||||||
|
|
||||||
template_name = "generic/update.html"
|
template_name = "generic/update.html"
|
||||||
success_url = reverse_lazy("passbook_admin:certificate_key_pair")
|
success_url = reverse_lazy("authentik_admin:certificate_key_pair")
|
||||||
success_message = _("Successfully updated Certificate-Key Pair")
|
success_message = _("Successfully updated Certificate-Key Pair")
|
||||||
|
|
||||||
|
|
||||||
@ -79,8 +79,8 @@ class CertificateKeyPairDeleteView(
|
|||||||
"""Delete certificatekeypair"""
|
"""Delete certificatekeypair"""
|
||||||
|
|
||||||
model = CertificateKeyPair
|
model = CertificateKeyPair
|
||||||
permission_required = "passbook_crypto.delete_certificatekeypair"
|
permission_required = "authentik_crypto.delete_certificatekeypair"
|
||||||
|
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:certificate_key_pair")
|
success_url = reverse_lazy("authentik_admin:certificate_key_pair")
|
||||||
success_message = _("Successfully deleted Certificate-Key Pair")
|
success_message = _("Successfully deleted Certificate-Key Pair")
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook Flow administration"""
|
"""authentik Flow administration"""
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.contrib.auth.mixins import (
|
from django.contrib.auth.mixins import (
|
||||||
@ -11,21 +11,21 @@ from django.utils.translation import gettext as _
|
|||||||
from django.views.generic import DetailView, FormView, ListView, UpdateView
|
from django.views.generic import DetailView, FormView, ListView, UpdateView
|
||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
|
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
SearchListMixin,
|
SearchListMixin,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.flows.forms import FlowForm, FlowImportForm
|
from authentik.flows.forms import FlowForm, FlowImportForm
|
||||||
from passbook.flows.models import Flow
|
from authentik.flows.models import Flow
|
||||||
from passbook.flows.planner import PLAN_CONTEXT_PENDING_USER
|
from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER
|
||||||
from passbook.flows.transfer.common import DataclassEncoder
|
from authentik.flows.transfer.common import DataclassEncoder
|
||||||
from passbook.flows.transfer.exporter import FlowExporter
|
from authentik.flows.transfer.exporter import FlowExporter
|
||||||
from passbook.flows.transfer.importer import FlowImporter
|
from authentik.flows.transfer.importer import FlowImporter
|
||||||
from passbook.flows.views import SESSION_KEY_PLAN, FlowPlanner
|
from authentik.flows.views import SESSION_KEY_PLAN, FlowPlanner
|
||||||
from passbook.lib.utils.urls import redirect_with_qs
|
from authentik.lib.utils.urls import redirect_with_qs
|
||||||
from passbook.lib.views import CreateAssignPermView
|
from authentik.lib.views import CreateAssignPermView
|
||||||
|
|
||||||
|
|
||||||
class FlowListView(
|
class FlowListView(
|
||||||
@ -38,7 +38,7 @@ class FlowListView(
|
|||||||
"""Show list of all flows"""
|
"""Show list of all flows"""
|
||||||
|
|
||||||
model = Flow
|
model = Flow
|
||||||
permission_required = "passbook_flows.view_flow"
|
permission_required = "authentik_flows.view_flow"
|
||||||
ordering = "name"
|
ordering = "name"
|
||||||
template_name = "administration/flow/list.html"
|
template_name = "administration/flow/list.html"
|
||||||
search_fields = ["name", "slug", "designation", "title"]
|
search_fields = ["name", "slug", "designation", "title"]
|
||||||
@ -55,10 +55,10 @@ class FlowCreateView(
|
|||||||
|
|
||||||
model = Flow
|
model = Flow
|
||||||
form_class = FlowForm
|
form_class = FlowForm
|
||||||
permission_required = "passbook_flows.add_flow"
|
permission_required = "authentik_flows.add_flow"
|
||||||
|
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
success_url = reverse_lazy("passbook_admin:flows")
|
success_url = reverse_lazy("authentik_admin:flows")
|
||||||
success_message = _("Successfully created Flow")
|
success_message = _("Successfully created Flow")
|
||||||
|
|
||||||
|
|
||||||
@ -73,10 +73,10 @@ class FlowUpdateView(
|
|||||||
|
|
||||||
model = Flow
|
model = Flow
|
||||||
form_class = FlowForm
|
form_class = FlowForm
|
||||||
permission_required = "passbook_flows.change_flow"
|
permission_required = "authentik_flows.change_flow"
|
||||||
|
|
||||||
template_name = "generic/update.html"
|
template_name = "generic/update.html"
|
||||||
success_url = reverse_lazy("passbook_admin:flows")
|
success_url = reverse_lazy("authentik_admin:flows")
|
||||||
success_message = _("Successfully updated Flow")
|
success_message = _("Successfully updated Flow")
|
||||||
|
|
||||||
|
|
||||||
@ -84,10 +84,10 @@ class FlowDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageV
|
|||||||
"""Delete flow"""
|
"""Delete flow"""
|
||||||
|
|
||||||
model = Flow
|
model = Flow
|
||||||
permission_required = "passbook_flows.delete_flow"
|
permission_required = "authentik_flows.delete_flow"
|
||||||
|
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:flows")
|
success_url = reverse_lazy("authentik_admin:flows")
|
||||||
success_message = _("Successfully deleted Flow")
|
success_message = _("Successfully deleted Flow")
|
||||||
|
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ class FlowDebugExecuteView(LoginRequiredMixin, PermissionRequiredMixin, DetailVi
|
|||||||
"""Debug exectue flow, setting the current user as pending user"""
|
"""Debug exectue flow, setting the current user as pending user"""
|
||||||
|
|
||||||
model = Flow
|
model = Flow
|
||||||
permission_required = "passbook_flows.view_flow"
|
permission_required = "authentik_flows.view_flow"
|
||||||
|
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
def get(self, request: HttpRequest, pk: str) -> HttpResponse:
|
def get(self, request: HttpRequest, pk: str) -> HttpResponse:
|
||||||
@ -106,7 +106,7 @@ class FlowDebugExecuteView(LoginRequiredMixin, PermissionRequiredMixin, DetailVi
|
|||||||
plan = planner.plan(self.request, {PLAN_CONTEXT_PENDING_USER: request.user})
|
plan = planner.plan(self.request, {PLAN_CONTEXT_PENDING_USER: request.user})
|
||||||
self.request.session[SESSION_KEY_PLAN] = plan
|
self.request.session[SESSION_KEY_PLAN] = plan
|
||||||
return redirect_with_qs(
|
return redirect_with_qs(
|
||||||
"passbook_flows:flow-executor-shell",
|
"authentik_flows:flow-executor-shell",
|
||||||
self.request.GET,
|
self.request.GET,
|
||||||
flow_slug=flow.slug,
|
flow_slug=flow.slug,
|
||||||
)
|
)
|
||||||
@ -118,7 +118,7 @@ class FlowImportView(LoginRequiredMixin, FormView):
|
|||||||
|
|
||||||
form_class = FlowImportForm
|
form_class = FlowImportForm
|
||||||
template_name = "administration/flow/import.html"
|
template_name = "administration/flow/import.html"
|
||||||
success_url = reverse_lazy("passbook_admin:flows")
|
success_url = reverse_lazy("authentik_admin:flows")
|
||||||
|
|
||||||
def dispatch(self, request, *args, **kwargs):
|
def dispatch(self, request, *args, **kwargs):
|
||||||
if not request.user.is_superuser:
|
if not request.user.is_superuser:
|
||||||
@ -139,7 +139,7 @@ class FlowExportView(LoginRequiredMixin, PermissionRequiredMixin, DetailView):
|
|||||||
"""Export Flow"""
|
"""Export Flow"""
|
||||||
|
|
||||||
model = Flow
|
model = Flow
|
||||||
permission_required = "passbook_flows.export_flow"
|
permission_required = "authentik_flows.export_flow"
|
||||||
|
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
def get(self, request: HttpRequest, pk: str) -> HttpResponse:
|
def get(self, request: HttpRequest, pk: str) -> HttpResponse:
|
||||||
@ -147,5 +147,5 @@ class FlowExportView(LoginRequiredMixin, PermissionRequiredMixin, DetailView):
|
|||||||
flow: Flow = self.get_object()
|
flow: Flow = self.get_object()
|
||||||
exporter = FlowExporter(flow)
|
exporter = FlowExporter(flow)
|
||||||
response = JsonResponse(exporter.export(), encoder=DataclassEncoder, safe=False)
|
response = JsonResponse(exporter.export(), encoder=DataclassEncoder, safe=False)
|
||||||
response["Content-Disposition"] = f'attachment; filename="{flow.slug}.pbflow"'
|
response["Content-Disposition"] = f'attachment; filename="{flow.slug}.akflow"'
|
||||||
return response
|
return response
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook Group administration"""
|
"""authentik Group administration"""
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.contrib.auth.mixins import (
|
from django.contrib.auth.mixins import (
|
||||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||||
@ -9,15 +9,15 @@ from django.utils.translation import gettext as _
|
|||||||
from django.views.generic import ListView, UpdateView
|
from django.views.generic import ListView, UpdateView
|
||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
|
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
SearchListMixin,
|
SearchListMixin,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.core.forms.groups import GroupForm
|
from authentik.core.forms.groups import GroupForm
|
||||||
from passbook.core.models import Group
|
from authentik.core.models import Group
|
||||||
from passbook.lib.views import CreateAssignPermView
|
from authentik.lib.views import CreateAssignPermView
|
||||||
|
|
||||||
|
|
||||||
class GroupListView(
|
class GroupListView(
|
||||||
@ -30,7 +30,7 @@ class GroupListView(
|
|||||||
"""Show list of all groups"""
|
"""Show list of all groups"""
|
||||||
|
|
||||||
model = Group
|
model = Group
|
||||||
permission_required = "passbook_core.view_group"
|
permission_required = "authentik_core.view_group"
|
||||||
ordering = "name"
|
ordering = "name"
|
||||||
template_name = "administration/group/list.html"
|
template_name = "administration/group/list.html"
|
||||||
search_fields = ["name", "attributes"]
|
search_fields = ["name", "attributes"]
|
||||||
@ -47,10 +47,10 @@ class GroupCreateView(
|
|||||||
|
|
||||||
model = Group
|
model = Group
|
||||||
form_class = GroupForm
|
form_class = GroupForm
|
||||||
permission_required = "passbook_core.add_group"
|
permission_required = "authentik_core.add_group"
|
||||||
|
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
success_url = reverse_lazy("passbook_admin:groups")
|
success_url = reverse_lazy("authentik_admin:groups")
|
||||||
success_message = _("Successfully created Group")
|
success_message = _("Successfully created Group")
|
||||||
|
|
||||||
|
|
||||||
@ -65,10 +65,10 @@ class GroupUpdateView(
|
|||||||
|
|
||||||
model = Group
|
model = Group
|
||||||
form_class = GroupForm
|
form_class = GroupForm
|
||||||
permission_required = "passbook_core.change_group"
|
permission_required = "authentik_core.change_group"
|
||||||
|
|
||||||
template_name = "generic/update.html"
|
template_name = "generic/update.html"
|
||||||
success_url = reverse_lazy("passbook_admin:groups")
|
success_url = reverse_lazy("authentik_admin:groups")
|
||||||
success_message = _("Successfully updated Group")
|
success_message = _("Successfully updated Group")
|
||||||
|
|
||||||
|
|
||||||
@ -76,8 +76,8 @@ class GroupDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessage
|
|||||||
"""Delete group"""
|
"""Delete group"""
|
||||||
|
|
||||||
model = Group
|
model = Group
|
||||||
permission_required = "passbook_flows.delete_group"
|
permission_required = "authentik_flows.delete_group"
|
||||||
|
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:groups")
|
success_url = reverse_lazy("authentik_admin:groups")
|
||||||
success_message = _("Successfully deleted Group")
|
success_message = _("Successfully deleted Group")
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook Outpost administration"""
|
"""authentik Outpost administration"""
|
||||||
from dataclasses import asdict
|
from dataclasses import asdict
|
||||||
from typing import Any, Dict
|
from typing import Any, Dict
|
||||||
|
|
||||||
@ -12,15 +12,15 @@ from django.utils.translation import gettext as _
|
|||||||
from django.views.generic import ListView, UpdateView
|
from django.views.generic import ListView, UpdateView
|
||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
|
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
SearchListMixin,
|
SearchListMixin,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.lib.views import CreateAssignPermView
|
from authentik.lib.views import CreateAssignPermView
|
||||||
from passbook.outposts.forms import OutpostForm
|
from authentik.outposts.forms import OutpostForm
|
||||||
from passbook.outposts.models import Outpost, OutpostConfig
|
from authentik.outposts.models import Outpost, OutpostConfig
|
||||||
|
|
||||||
|
|
||||||
class OutpostListView(
|
class OutpostListView(
|
||||||
@ -33,7 +33,7 @@ class OutpostListView(
|
|||||||
"""Show list of all outposts"""
|
"""Show list of all outposts"""
|
||||||
|
|
||||||
model = Outpost
|
model = Outpost
|
||||||
permission_required = "passbook_outposts.view_outpost"
|
permission_required = "authentik_outposts.view_outpost"
|
||||||
ordering = "name"
|
ordering = "name"
|
||||||
template_name = "administration/outpost/list.html"
|
template_name = "administration/outpost/list.html"
|
||||||
search_fields = ["name", "_config"]
|
search_fields = ["name", "_config"]
|
||||||
@ -50,16 +50,16 @@ class OutpostCreateView(
|
|||||||
|
|
||||||
model = Outpost
|
model = Outpost
|
||||||
form_class = OutpostForm
|
form_class = OutpostForm
|
||||||
permission_required = "passbook_outposts.add_outpost"
|
permission_required = "authentik_outposts.add_outpost"
|
||||||
|
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
success_url = reverse_lazy("passbook_admin:outposts")
|
success_url = reverse_lazy("authentik_admin:outposts")
|
||||||
success_message = _("Successfully created Outpost")
|
success_message = _("Successfully created Outpost")
|
||||||
|
|
||||||
def get_initial(self) -> Dict[str, Any]:
|
def get_initial(self) -> Dict[str, Any]:
|
||||||
return {
|
return {
|
||||||
"_config": asdict(
|
"_config": asdict(
|
||||||
OutpostConfig(passbook_host=self.request.build_absolute_uri("/"))
|
OutpostConfig(authentik_host=self.request.build_absolute_uri("/"))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,10 +75,10 @@ class OutpostUpdateView(
|
|||||||
|
|
||||||
model = Outpost
|
model = Outpost
|
||||||
form_class = OutpostForm
|
form_class = OutpostForm
|
||||||
permission_required = "passbook_outposts.change_outpost"
|
permission_required = "authentik_outposts.change_outpost"
|
||||||
|
|
||||||
template_name = "generic/update.html"
|
template_name = "generic/update.html"
|
||||||
success_url = reverse_lazy("passbook_admin:outposts")
|
success_url = reverse_lazy("authentik_admin:outposts")
|
||||||
success_message = _("Successfully updated Outpost")
|
success_message = _("Successfully updated Outpost")
|
||||||
|
|
||||||
|
|
||||||
@ -86,8 +86,8 @@ class OutpostDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessa
|
|||||||
"""Delete outpost"""
|
"""Delete outpost"""
|
||||||
|
|
||||||
model = Outpost
|
model = Outpost
|
||||||
permission_required = "passbook_outposts.delete_outpost"
|
permission_required = "authentik_outposts.delete_outpost"
|
||||||
|
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:outposts")
|
success_url = reverse_lazy("authentik_admin:outposts")
|
||||||
success_message = _("Successfully deleted Outpost")
|
success_message = _("Successfully deleted Outpost")
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook OutpostServiceConnection administration"""
|
"""authentik OutpostServiceConnection administration"""
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.contrib.auth.mixins import (
|
from django.contrib.auth.mixins import (
|
||||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||||
@ -8,7 +8,7 @@ from django.urls import reverse_lazy
|
|||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
|
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
InheritanceCreateView,
|
InheritanceCreateView,
|
||||||
@ -17,7 +17,7 @@ from passbook.admin.views.utils import (
|
|||||||
SearchListMixin,
|
SearchListMixin,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.outposts.models import OutpostServiceConnection
|
from authentik.outposts.models import OutpostServiceConnection
|
||||||
|
|
||||||
|
|
||||||
class OutpostServiceConnectionListView(
|
class OutpostServiceConnectionListView(
|
||||||
@ -30,7 +30,7 @@ class OutpostServiceConnectionListView(
|
|||||||
"""Show list of all outpost-service-connections"""
|
"""Show list of all outpost-service-connections"""
|
||||||
|
|
||||||
model = OutpostServiceConnection
|
model = OutpostServiceConnection
|
||||||
permission_required = "passbook_outposts.add_outpostserviceconnection"
|
permission_required = "authentik_outposts.add_outpostserviceconnection"
|
||||||
template_name = "administration/outpost_service_connection/list.html"
|
template_name = "administration/outpost_service_connection/list.html"
|
||||||
ordering = "pk"
|
ordering = "pk"
|
||||||
search_fields = ["pk", "name"]
|
search_fields = ["pk", "name"]
|
||||||
@ -46,10 +46,10 @@ class OutpostServiceConnectionCreateView(
|
|||||||
"""Create new OutpostServiceConnection"""
|
"""Create new OutpostServiceConnection"""
|
||||||
|
|
||||||
model = OutpostServiceConnection
|
model = OutpostServiceConnection
|
||||||
permission_required = "passbook_outposts.add_outpostserviceconnection"
|
permission_required = "authentik_outposts.add_outpostserviceconnection"
|
||||||
|
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
success_url = reverse_lazy("passbook_admin:outpost-service-connections")
|
success_url = reverse_lazy("authentik_admin:outpost-service-connections")
|
||||||
success_message = _("Successfully created OutpostServiceConnection")
|
success_message = _("Successfully created OutpostServiceConnection")
|
||||||
|
|
||||||
|
|
||||||
@ -63,10 +63,10 @@ class OutpostServiceConnectionUpdateView(
|
|||||||
"""Update outpostserviceconnection"""
|
"""Update outpostserviceconnection"""
|
||||||
|
|
||||||
model = OutpostServiceConnection
|
model = OutpostServiceConnection
|
||||||
permission_required = "passbook_outposts.change_outpostserviceconnection"
|
permission_required = "authentik_outposts.change_outpostserviceconnection"
|
||||||
|
|
||||||
template_name = "generic/update.html"
|
template_name = "generic/update.html"
|
||||||
success_url = reverse_lazy("passbook_admin:outpost-service-connections")
|
success_url = reverse_lazy("authentik_admin:outpost-service-connections")
|
||||||
success_message = _("Successfully updated OutpostServiceConnection")
|
success_message = _("Successfully updated OutpostServiceConnection")
|
||||||
|
|
||||||
|
|
||||||
@ -76,8 +76,8 @@ class OutpostServiceConnectionDeleteView(
|
|||||||
"""Delete outpostserviceconnection"""
|
"""Delete outpostserviceconnection"""
|
||||||
|
|
||||||
model = OutpostServiceConnection
|
model = OutpostServiceConnection
|
||||||
permission_required = "passbook_outposts.delete_outpostserviceconnection"
|
permission_required = "authentik_outposts.delete_outpostserviceconnection"
|
||||||
|
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:outpost-service-connections")
|
success_url = reverse_lazy("authentik_admin:outpost-service-connections")
|
||||||
success_message = _("Successfully deleted OutpostServiceConnection")
|
success_message = _("Successfully deleted OutpostServiceConnection")
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook administration overview"""
|
"""authentik administration overview"""
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
@ -12,12 +12,12 @@ from django.views.generic import FormView, TemplateView
|
|||||||
from packaging.version import LegacyVersion, Version, parse
|
from packaging.version import LegacyVersion, Version, parse
|
||||||
from structlog import get_logger
|
from structlog import get_logger
|
||||||
|
|
||||||
from passbook import __version__
|
from authentik import __version__
|
||||||
from passbook.admin.forms.overview import FlowCacheClearForm, PolicyCacheClearForm
|
from authentik.admin.forms.overview import FlowCacheClearForm, PolicyCacheClearForm
|
||||||
from passbook.admin.mixins import AdminRequiredMixin
|
from authentik.admin.mixins import AdminRequiredMixin
|
||||||
from passbook.admin.tasks import VERSION_CACHE_KEY, update_latest_version
|
from authentik.admin.tasks import VERSION_CACHE_KEY, update_latest_version
|
||||||
from passbook.core.models import Provider, User
|
from authentik.core.models import Provider, User
|
||||||
from passbook.policies.models import Policy
|
from authentik.policies.models import Policy
|
||||||
|
|
||||||
LOGGER = get_logger()
|
LOGGER = get_logger()
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ class PolicyCacheClearView(AdminRequiredMixin, SuccessMessageMixin, FormView):
|
|||||||
form_class = PolicyCacheClearForm
|
form_class = PolicyCacheClearForm
|
||||||
|
|
||||||
template_name = "generic/form_non_model.html"
|
template_name = "generic/form_non_model.html"
|
||||||
success_url = reverse_lazy("passbook_admin:overview")
|
success_url = reverse_lazy("authentik_admin:overview")
|
||||||
success_message = _("Successfully cleared Policy cache")
|
success_message = _("Successfully cleared Policy cache")
|
||||||
|
|
||||||
def post(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
def post(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
||||||
@ -75,7 +75,7 @@ class FlowCacheClearView(AdminRequiredMixin, SuccessMessageMixin, FormView):
|
|||||||
form_class = FlowCacheClearForm
|
form_class = FlowCacheClearForm
|
||||||
|
|
||||||
template_name = "generic/form_non_model.html"
|
template_name = "generic/form_non_model.html"
|
||||||
success_url = reverse_lazy("passbook_admin:overview")
|
success_url = reverse_lazy("authentik_admin:overview")
|
||||||
success_message = _("Successfully cleared Flow cache")
|
success_message = _("Successfully cleared Flow cache")
|
||||||
|
|
||||||
def post(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
def post(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook Policy administration"""
|
"""authentik Policy administration"""
|
||||||
from typing import Any, Dict
|
from typing import Any, Dict
|
||||||
|
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
@ -15,8 +15,8 @@ from django.views.generic import FormView
|
|||||||
from django.views.generic.detail import DetailView
|
from django.views.generic.detail import DetailView
|
||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
|
|
||||||
from passbook.admin.forms.policies import PolicyTestForm
|
from authentik.admin.forms.policies import PolicyTestForm
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
InheritanceCreateView,
|
InheritanceCreateView,
|
||||||
@ -25,8 +25,8 @@ from passbook.admin.views.utils import (
|
|||||||
SearchListMixin,
|
SearchListMixin,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.policies.models import Policy, PolicyBinding
|
from authentik.policies.models import Policy, PolicyBinding
|
||||||
from passbook.policies.process import PolicyProcess, PolicyRequest
|
from authentik.policies.process import PolicyProcess, PolicyRequest
|
||||||
|
|
||||||
|
|
||||||
class PolicyListView(
|
class PolicyListView(
|
||||||
@ -39,7 +39,7 @@ class PolicyListView(
|
|||||||
"""Show list of all policies"""
|
"""Show list of all policies"""
|
||||||
|
|
||||||
model = Policy
|
model = Policy
|
||||||
permission_required = "passbook_policies.view_policy"
|
permission_required = "authentik_policies.view_policy"
|
||||||
ordering = "name"
|
ordering = "name"
|
||||||
template_name = "administration/policy/list.html"
|
template_name = "administration/policy/list.html"
|
||||||
search_fields = ["name"]
|
search_fields = ["name"]
|
||||||
@ -55,10 +55,10 @@ class PolicyCreateView(
|
|||||||
"""Create new Policy"""
|
"""Create new Policy"""
|
||||||
|
|
||||||
model = Policy
|
model = Policy
|
||||||
permission_required = "passbook_policies.add_policy"
|
permission_required = "authentik_policies.add_policy"
|
||||||
|
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
success_url = reverse_lazy("passbook_admin:policies")
|
success_url = reverse_lazy("authentik_admin:policies")
|
||||||
success_message = _("Successfully created Policy")
|
success_message = _("Successfully created Policy")
|
||||||
|
|
||||||
|
|
||||||
@ -72,10 +72,10 @@ class PolicyUpdateView(
|
|||||||
"""Update policy"""
|
"""Update policy"""
|
||||||
|
|
||||||
model = Policy
|
model = Policy
|
||||||
permission_required = "passbook_policies.change_policy"
|
permission_required = "authentik_policies.change_policy"
|
||||||
|
|
||||||
template_name = "generic/update.html"
|
template_name = "generic/update.html"
|
||||||
success_url = reverse_lazy("passbook_admin:policies")
|
success_url = reverse_lazy("authentik_admin:policies")
|
||||||
success_message = _("Successfully updated Policy")
|
success_message = _("Successfully updated Policy")
|
||||||
|
|
||||||
|
|
||||||
@ -83,10 +83,10 @@ class PolicyDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessag
|
|||||||
"""Delete policy"""
|
"""Delete policy"""
|
||||||
|
|
||||||
model = Policy
|
model = Policy
|
||||||
permission_required = "passbook_policies.delete_policy"
|
permission_required = "authentik_policies.delete_policy"
|
||||||
|
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:policies")
|
success_url = reverse_lazy("authentik_admin:policies")
|
||||||
success_message = _("Successfully deleted Policy")
|
success_message = _("Successfully deleted Policy")
|
||||||
|
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ class PolicyTestView(LoginRequiredMixin, DetailView, PermissionRequiredMixin, Fo
|
|||||||
|
|
||||||
model = Policy
|
model = Policy
|
||||||
form_class = PolicyTestForm
|
form_class = PolicyTestForm
|
||||||
permission_required = "passbook_policies.view_policy"
|
permission_required = "authentik_policies.view_policy"
|
||||||
template_name = "administration/policy/test.html"
|
template_name = "administration/policy/test.html"
|
||||||
object = None
|
object = None
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook PolicyBinding administration"""
|
"""authentik PolicyBinding administration"""
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.contrib.auth.mixins import (
|
from django.contrib.auth.mixins import (
|
||||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||||
@ -11,14 +11,14 @@ from django.views.generic import ListView, UpdateView
|
|||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
from guardian.shortcuts import get_objects_for_user
|
from guardian.shortcuts import get_objects_for_user
|
||||||
|
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.lib.views import CreateAssignPermView
|
from authentik.lib.views import CreateAssignPermView
|
||||||
from passbook.policies.forms import PolicyBindingForm
|
from authentik.policies.forms import PolicyBindingForm
|
||||||
from passbook.policies.models import PolicyBinding
|
from authentik.policies.models import PolicyBinding
|
||||||
|
|
||||||
|
|
||||||
class PolicyBindingListView(
|
class PolicyBindingListView(
|
||||||
@ -27,7 +27,7 @@ class PolicyBindingListView(
|
|||||||
"""Show list of all policies"""
|
"""Show list of all policies"""
|
||||||
|
|
||||||
model = PolicyBinding
|
model = PolicyBinding
|
||||||
permission_required = "passbook_policies.view_policybinding"
|
permission_required = "authentik_policies.view_policybinding"
|
||||||
ordering = ["order", "target"]
|
ordering = ["order", "target"]
|
||||||
template_name = "administration/policy_binding/list.html"
|
template_name = "administration/policy_binding/list.html"
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ class PolicyBindingListView(
|
|||||||
# First, get all pbm objects that have bindings attached
|
# First, get all pbm objects that have bindings attached
|
||||||
objects = (
|
objects = (
|
||||||
get_objects_for_user(
|
get_objects_for_user(
|
||||||
self.request.user, "passbook_policies.view_policybindingmodel"
|
self.request.user, "authentik_policies.view_policybindingmodel"
|
||||||
)
|
)
|
||||||
.filter(policies__isnull=False)
|
.filter(policies__isnull=False)
|
||||||
.select_subclasses()
|
.select_subclasses()
|
||||||
@ -60,11 +60,11 @@ class PolicyBindingCreateView(
|
|||||||
"""Create new PolicyBinding"""
|
"""Create new PolicyBinding"""
|
||||||
|
|
||||||
model = PolicyBinding
|
model = PolicyBinding
|
||||||
permission_required = "passbook_policies.add_policybinding"
|
permission_required = "authentik_policies.add_policybinding"
|
||||||
form_class = PolicyBindingForm
|
form_class = PolicyBindingForm
|
||||||
|
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
success_url = reverse_lazy("passbook_admin:policies-bindings")
|
success_url = reverse_lazy("authentik_admin:policies-bindings")
|
||||||
success_message = _("Successfully created PolicyBinding")
|
success_message = _("Successfully created PolicyBinding")
|
||||||
|
|
||||||
|
|
||||||
@ -78,11 +78,11 @@ class PolicyBindingUpdateView(
|
|||||||
"""Update policybinding"""
|
"""Update policybinding"""
|
||||||
|
|
||||||
model = PolicyBinding
|
model = PolicyBinding
|
||||||
permission_required = "passbook_policies.change_policybinding"
|
permission_required = "authentik_policies.change_policybinding"
|
||||||
form_class = PolicyBindingForm
|
form_class = PolicyBindingForm
|
||||||
|
|
||||||
template_name = "generic/update.html"
|
template_name = "generic/update.html"
|
||||||
success_url = reverse_lazy("passbook_admin:policies-bindings")
|
success_url = reverse_lazy("authentik_admin:policies-bindings")
|
||||||
success_message = _("Successfully updated PolicyBinding")
|
success_message = _("Successfully updated PolicyBinding")
|
||||||
|
|
||||||
|
|
||||||
@ -92,8 +92,8 @@ class PolicyBindingDeleteView(
|
|||||||
"""Delete policybinding"""
|
"""Delete policybinding"""
|
||||||
|
|
||||||
model = PolicyBinding
|
model = PolicyBinding
|
||||||
permission_required = "passbook_policies.delete_policybinding"
|
permission_required = "authentik_policies.delete_policybinding"
|
||||||
|
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:policies-bindings")
|
success_url = reverse_lazy("authentik_admin:policies-bindings")
|
||||||
success_message = _("Successfully deleted PolicyBinding")
|
success_message = _("Successfully deleted PolicyBinding")
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook PropertyMapping administration"""
|
"""authentik PropertyMapping administration"""
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.contrib.auth.mixins import (
|
from django.contrib.auth.mixins import (
|
||||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||||
@ -8,7 +8,7 @@ from django.urls import reverse_lazy
|
|||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
|
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
InheritanceCreateView,
|
InheritanceCreateView,
|
||||||
@ -17,7 +17,7 @@ from passbook.admin.views.utils import (
|
|||||||
SearchListMixin,
|
SearchListMixin,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.core.models import PropertyMapping
|
from authentik.core.models import PropertyMapping
|
||||||
|
|
||||||
|
|
||||||
class PropertyMappingListView(
|
class PropertyMappingListView(
|
||||||
@ -30,7 +30,7 @@ class PropertyMappingListView(
|
|||||||
"""Show list of all property_mappings"""
|
"""Show list of all property_mappings"""
|
||||||
|
|
||||||
model = PropertyMapping
|
model = PropertyMapping
|
||||||
permission_required = "passbook_core.view_propertymapping"
|
permission_required = "authentik_core.view_propertymapping"
|
||||||
template_name = "administration/property_mapping/list.html"
|
template_name = "administration/property_mapping/list.html"
|
||||||
ordering = "name"
|
ordering = "name"
|
||||||
search_fields = ["name", "expression"]
|
search_fields = ["name", "expression"]
|
||||||
@ -46,10 +46,10 @@ class PropertyMappingCreateView(
|
|||||||
"""Create new PropertyMapping"""
|
"""Create new PropertyMapping"""
|
||||||
|
|
||||||
model = PropertyMapping
|
model = PropertyMapping
|
||||||
permission_required = "passbook_core.add_propertymapping"
|
permission_required = "authentik_core.add_propertymapping"
|
||||||
|
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
success_url = reverse_lazy("passbook_admin:property-mappings")
|
success_url = reverse_lazy("authentik_admin:property-mappings")
|
||||||
success_message = _("Successfully created Property Mapping")
|
success_message = _("Successfully created Property Mapping")
|
||||||
|
|
||||||
|
|
||||||
@ -63,10 +63,10 @@ class PropertyMappingUpdateView(
|
|||||||
"""Update property_mapping"""
|
"""Update property_mapping"""
|
||||||
|
|
||||||
model = PropertyMapping
|
model = PropertyMapping
|
||||||
permission_required = "passbook_core.change_propertymapping"
|
permission_required = "authentik_core.change_propertymapping"
|
||||||
|
|
||||||
template_name = "generic/update.html"
|
template_name = "generic/update.html"
|
||||||
success_url = reverse_lazy("passbook_admin:property-mappings")
|
success_url = reverse_lazy("authentik_admin:property-mappings")
|
||||||
success_message = _("Successfully updated Property Mapping")
|
success_message = _("Successfully updated Property Mapping")
|
||||||
|
|
||||||
|
|
||||||
@ -76,8 +76,8 @@ class PropertyMappingDeleteView(
|
|||||||
"""Delete property_mapping"""
|
"""Delete property_mapping"""
|
||||||
|
|
||||||
model = PropertyMapping
|
model = PropertyMapping
|
||||||
permission_required = "passbook_core.delete_propertymapping"
|
permission_required = "authentik_core.delete_propertymapping"
|
||||||
|
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:property-mappings")
|
success_url = reverse_lazy("authentik_admin:property-mappings")
|
||||||
success_message = _("Successfully deleted Property Mapping")
|
success_message = _("Successfully deleted Property Mapping")
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook Provider administration"""
|
"""authentik Provider administration"""
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.contrib.auth.mixins import (
|
from django.contrib.auth.mixins import (
|
||||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||||
@ -8,7 +8,7 @@ from django.urls import reverse_lazy
|
|||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
|
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
InheritanceCreateView,
|
InheritanceCreateView,
|
||||||
@ -17,7 +17,7 @@ from passbook.admin.views.utils import (
|
|||||||
SearchListMixin,
|
SearchListMixin,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.core.models import Provider
|
from authentik.core.models import Provider
|
||||||
|
|
||||||
|
|
||||||
class ProviderListView(
|
class ProviderListView(
|
||||||
@ -30,7 +30,7 @@ class ProviderListView(
|
|||||||
"""Show list of all providers"""
|
"""Show list of all providers"""
|
||||||
|
|
||||||
model = Provider
|
model = Provider
|
||||||
permission_required = "passbook_core.add_provider"
|
permission_required = "authentik_core.add_provider"
|
||||||
template_name = "administration/provider/list.html"
|
template_name = "administration/provider/list.html"
|
||||||
ordering = "pk"
|
ordering = "pk"
|
||||||
search_fields = ["pk", "name"]
|
search_fields = ["pk", "name"]
|
||||||
@ -46,10 +46,10 @@ class ProviderCreateView(
|
|||||||
"""Create new Provider"""
|
"""Create new Provider"""
|
||||||
|
|
||||||
model = Provider
|
model = Provider
|
||||||
permission_required = "passbook_core.add_provider"
|
permission_required = "authentik_core.add_provider"
|
||||||
|
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
success_url = reverse_lazy("passbook_admin:providers")
|
success_url = reverse_lazy("authentik_admin:providers")
|
||||||
success_message = _("Successfully created Provider")
|
success_message = _("Successfully created Provider")
|
||||||
|
|
||||||
|
|
||||||
@ -63,10 +63,10 @@ class ProviderUpdateView(
|
|||||||
"""Update provider"""
|
"""Update provider"""
|
||||||
|
|
||||||
model = Provider
|
model = Provider
|
||||||
permission_required = "passbook_core.change_provider"
|
permission_required = "authentik_core.change_provider"
|
||||||
|
|
||||||
template_name = "generic/update.html"
|
template_name = "generic/update.html"
|
||||||
success_url = reverse_lazy("passbook_admin:providers")
|
success_url = reverse_lazy("authentik_admin:providers")
|
||||||
success_message = _("Successfully updated Provider")
|
success_message = _("Successfully updated Provider")
|
||||||
|
|
||||||
|
|
||||||
@ -76,8 +76,8 @@ class ProviderDeleteView(
|
|||||||
"""Delete provider"""
|
"""Delete provider"""
|
||||||
|
|
||||||
model = Provider
|
model = Provider
|
||||||
permission_required = "passbook_core.delete_provider"
|
permission_required = "authentik_core.delete_provider"
|
||||||
|
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:providers")
|
success_url = reverse_lazy("authentik_admin:providers")
|
||||||
success_message = _("Successfully deleted Provider")
|
success_message = _("Successfully deleted Provider")
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook Source administration"""
|
"""authentik Source administration"""
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.contrib.auth.mixins import (
|
from django.contrib.auth.mixins import (
|
||||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||||
@ -8,7 +8,7 @@ from django.urls import reverse_lazy
|
|||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
|
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
InheritanceCreateView,
|
InheritanceCreateView,
|
||||||
@ -17,7 +17,7 @@ from passbook.admin.views.utils import (
|
|||||||
SearchListMixin,
|
SearchListMixin,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.core.models import Source
|
from authentik.core.models import Source
|
||||||
|
|
||||||
|
|
||||||
class SourceListView(
|
class SourceListView(
|
||||||
@ -30,7 +30,7 @@ class SourceListView(
|
|||||||
"""Show list of all sources"""
|
"""Show list of all sources"""
|
||||||
|
|
||||||
model = Source
|
model = Source
|
||||||
permission_required = "passbook_core.view_source"
|
permission_required = "authentik_core.view_source"
|
||||||
ordering = "name"
|
ordering = "name"
|
||||||
template_name = "administration/source/list.html"
|
template_name = "administration/source/list.html"
|
||||||
search_fields = ["name", "slug"]
|
search_fields = ["name", "slug"]
|
||||||
@ -46,10 +46,10 @@ class SourceCreateView(
|
|||||||
"""Create new Source"""
|
"""Create new Source"""
|
||||||
|
|
||||||
model = Source
|
model = Source
|
||||||
permission_required = "passbook_core.add_source"
|
permission_required = "authentik_core.add_source"
|
||||||
|
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
success_url = reverse_lazy("passbook_admin:sources")
|
success_url = reverse_lazy("authentik_admin:sources")
|
||||||
success_message = _("Successfully created Source")
|
success_message = _("Successfully created Source")
|
||||||
|
|
||||||
|
|
||||||
@ -63,10 +63,10 @@ class SourceUpdateView(
|
|||||||
"""Update source"""
|
"""Update source"""
|
||||||
|
|
||||||
model = Source
|
model = Source
|
||||||
permission_required = "passbook_core.change_source"
|
permission_required = "authentik_core.change_source"
|
||||||
|
|
||||||
template_name = "generic/update.html"
|
template_name = "generic/update.html"
|
||||||
success_url = reverse_lazy("passbook_admin:sources")
|
success_url = reverse_lazy("authentik_admin:sources")
|
||||||
success_message = _("Successfully updated Source")
|
success_message = _("Successfully updated Source")
|
||||||
|
|
||||||
|
|
||||||
@ -74,8 +74,8 @@ class SourceDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessag
|
|||||||
"""Delete source"""
|
"""Delete source"""
|
||||||
|
|
||||||
model = Source
|
model = Source
|
||||||
permission_required = "passbook_core.delete_source"
|
permission_required = "authentik_core.delete_source"
|
||||||
|
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:sources")
|
success_url = reverse_lazy("authentik_admin:sources")
|
||||||
success_message = _("Successfully deleted Source")
|
success_message = _("Successfully deleted Source")
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook Stage administration"""
|
"""authentik Stage administration"""
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.contrib.auth.mixins import (
|
from django.contrib.auth.mixins import (
|
||||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||||
@ -8,7 +8,7 @@ from django.urls import reverse_lazy
|
|||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
|
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
InheritanceCreateView,
|
InheritanceCreateView,
|
||||||
@ -17,7 +17,7 @@ from passbook.admin.views.utils import (
|
|||||||
SearchListMixin,
|
SearchListMixin,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.flows.models import Stage
|
from authentik.flows.models import Stage
|
||||||
|
|
||||||
|
|
||||||
class StageListView(
|
class StageListView(
|
||||||
@ -31,7 +31,7 @@ class StageListView(
|
|||||||
|
|
||||||
model = Stage
|
model = Stage
|
||||||
template_name = "administration/stage/list.html"
|
template_name = "administration/stage/list.html"
|
||||||
permission_required = "passbook_flows.view_stage"
|
permission_required = "authentik_flows.view_stage"
|
||||||
ordering = "name"
|
ordering = "name"
|
||||||
search_fields = ["name"]
|
search_fields = ["name"]
|
||||||
|
|
||||||
@ -47,9 +47,9 @@ class StageCreateView(
|
|||||||
|
|
||||||
model = Stage
|
model = Stage
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
permission_required = "passbook_flows.add_stage"
|
permission_required = "authentik_flows.add_stage"
|
||||||
|
|
||||||
success_url = reverse_lazy("passbook_admin:stages")
|
success_url = reverse_lazy("authentik_admin:stages")
|
||||||
success_message = _("Successfully created Stage")
|
success_message = _("Successfully created Stage")
|
||||||
|
|
||||||
|
|
||||||
@ -63,9 +63,9 @@ class StageUpdateView(
|
|||||||
"""Update stage"""
|
"""Update stage"""
|
||||||
|
|
||||||
model = Stage
|
model = Stage
|
||||||
permission_required = "passbook_flows.update_application"
|
permission_required = "authentik_flows.update_application"
|
||||||
template_name = "generic/update.html"
|
template_name = "generic/update.html"
|
||||||
success_url = reverse_lazy("passbook_admin:stages")
|
success_url = reverse_lazy("authentik_admin:stages")
|
||||||
success_message = _("Successfully updated Stage")
|
success_message = _("Successfully updated Stage")
|
||||||
|
|
||||||
|
|
||||||
@ -74,6 +74,6 @@ class StageDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessage
|
|||||||
|
|
||||||
model = Stage
|
model = Stage
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
permission_required = "passbook_flows.delete_stage"
|
permission_required = "authentik_flows.delete_stage"
|
||||||
success_url = reverse_lazy("passbook_admin:stages")
|
success_url = reverse_lazy("authentik_admin:stages")
|
||||||
success_message = _("Successfully deleted Stage")
|
success_message = _("Successfully deleted Stage")
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook StageBinding administration"""
|
"""authentik StageBinding administration"""
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.contrib.auth.mixins import (
|
from django.contrib.auth.mixins import (
|
||||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||||
@ -9,14 +9,14 @@ from django.utils.translation import gettext as _
|
|||||||
from django.views.generic import ListView, UpdateView
|
from django.views.generic import ListView, UpdateView
|
||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
|
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.flows.forms import FlowStageBindingForm
|
from authentik.flows.forms import FlowStageBindingForm
|
||||||
from passbook.flows.models import FlowStageBinding
|
from authentik.flows.models import FlowStageBinding
|
||||||
from passbook.lib.views import CreateAssignPermView
|
from authentik.lib.views import CreateAssignPermView
|
||||||
|
|
||||||
|
|
||||||
class StageBindingListView(
|
class StageBindingListView(
|
||||||
@ -25,7 +25,7 @@ class StageBindingListView(
|
|||||||
"""Show list of all flows"""
|
"""Show list of all flows"""
|
||||||
|
|
||||||
model = FlowStageBinding
|
model = FlowStageBinding
|
||||||
permission_required = "passbook_flows.view_flowstagebinding"
|
permission_required = "authentik_flows.view_flowstagebinding"
|
||||||
ordering = ["target", "order"]
|
ordering = ["target", "order"]
|
||||||
template_name = "administration/stage_binding/list.html"
|
template_name = "administration/stage_binding/list.html"
|
||||||
|
|
||||||
@ -40,11 +40,11 @@ class StageBindingCreateView(
|
|||||||
"""Create new StageBinding"""
|
"""Create new StageBinding"""
|
||||||
|
|
||||||
model = FlowStageBinding
|
model = FlowStageBinding
|
||||||
permission_required = "passbook_flows.add_flowstagebinding"
|
permission_required = "authentik_flows.add_flowstagebinding"
|
||||||
form_class = FlowStageBindingForm
|
form_class = FlowStageBindingForm
|
||||||
|
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
success_url = reverse_lazy("passbook_admin:stage-bindings")
|
success_url = reverse_lazy("authentik_admin:stage-bindings")
|
||||||
success_message = _("Successfully created StageBinding")
|
success_message = _("Successfully created StageBinding")
|
||||||
|
|
||||||
|
|
||||||
@ -58,11 +58,11 @@ class StageBindingUpdateView(
|
|||||||
"""Update FlowStageBinding"""
|
"""Update FlowStageBinding"""
|
||||||
|
|
||||||
model = FlowStageBinding
|
model = FlowStageBinding
|
||||||
permission_required = "passbook_flows.change_flowstagebinding"
|
permission_required = "authentik_flows.change_flowstagebinding"
|
||||||
form_class = FlowStageBindingForm
|
form_class = FlowStageBindingForm
|
||||||
|
|
||||||
template_name = "generic/update.html"
|
template_name = "generic/update.html"
|
||||||
success_url = reverse_lazy("passbook_admin:stage-bindings")
|
success_url = reverse_lazy("authentik_admin:stage-bindings")
|
||||||
success_message = _("Successfully updated StageBinding")
|
success_message = _("Successfully updated StageBinding")
|
||||||
|
|
||||||
|
|
||||||
@ -72,8 +72,8 @@ class StageBindingDeleteView(
|
|||||||
"""Delete FlowStageBinding"""
|
"""Delete FlowStageBinding"""
|
||||||
|
|
||||||
model = FlowStageBinding
|
model = FlowStageBinding
|
||||||
permission_required = "passbook_flows.delete_flowstagebinding"
|
permission_required = "authentik_flows.delete_flowstagebinding"
|
||||||
|
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:stage-bindings")
|
success_url = reverse_lazy("authentik_admin:stage-bindings")
|
||||||
success_message = _("Successfully deleted FlowStageBinding")
|
success_message = _("Successfully deleted FlowStageBinding")
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook Invitation administration"""
|
"""authentik Invitation administration"""
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.contrib.auth.mixins import (
|
from django.contrib.auth.mixins import (
|
||||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||||
@ -10,16 +10,16 @@ from django.utils.translation import gettext as _
|
|||||||
from django.views.generic import ListView
|
from django.views.generic import ListView
|
||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
|
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
SearchListMixin,
|
SearchListMixin,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.lib.views import CreateAssignPermView
|
from authentik.lib.views import CreateAssignPermView
|
||||||
from passbook.stages.invitation.forms import InvitationForm
|
from authentik.stages.invitation.forms import InvitationForm
|
||||||
from passbook.stages.invitation.models import Invitation
|
from authentik.stages.invitation.models import Invitation
|
||||||
from passbook.stages.invitation.signals import invitation_created
|
from authentik.stages.invitation.signals import invitation_created
|
||||||
|
|
||||||
|
|
||||||
class InvitationListView(
|
class InvitationListView(
|
||||||
@ -32,7 +32,7 @@ class InvitationListView(
|
|||||||
"""Show list of all invitations"""
|
"""Show list of all invitations"""
|
||||||
|
|
||||||
model = Invitation
|
model = Invitation
|
||||||
permission_required = "passbook_stages_invitation.view_invitation"
|
permission_required = "authentik_stages_invitation.view_invitation"
|
||||||
template_name = "administration/stage_invitation/list.html"
|
template_name = "administration/stage_invitation/list.html"
|
||||||
ordering = "-expires"
|
ordering = "-expires"
|
||||||
search_fields = ["created_by__username", "expires", "fixed_data"]
|
search_fields = ["created_by__username", "expires", "fixed_data"]
|
||||||
@ -49,10 +49,10 @@ class InvitationCreateView(
|
|||||||
|
|
||||||
model = Invitation
|
model = Invitation
|
||||||
form_class = InvitationForm
|
form_class = InvitationForm
|
||||||
permission_required = "passbook_stages_invitation.add_invitation"
|
permission_required = "authentik_stages_invitation.add_invitation"
|
||||||
|
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
success_url = reverse_lazy("passbook_admin:stage-invitations")
|
success_url = reverse_lazy("authentik_admin:stage-invitations")
|
||||||
success_message = _("Successfully created Invitation")
|
success_message = _("Successfully created Invitation")
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
@ -69,8 +69,8 @@ class InvitationDeleteView(
|
|||||||
"""Delete invitation"""
|
"""Delete invitation"""
|
||||||
|
|
||||||
model = Invitation
|
model = Invitation
|
||||||
permission_required = "passbook_stages_invitation.delete_invitation"
|
permission_required = "authentik_stages_invitation.delete_invitation"
|
||||||
|
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:stage-invitations")
|
success_url = reverse_lazy("authentik_admin:stage-invitations")
|
||||||
success_message = _("Successfully deleted Invitation")
|
success_message = _("Successfully deleted Invitation")
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook Prompt administration"""
|
"""authentik Prompt administration"""
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.contrib.auth.mixins import (
|
from django.contrib.auth.mixins import (
|
||||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||||
@ -9,15 +9,15 @@ from django.utils.translation import gettext as _
|
|||||||
from django.views.generic import ListView, UpdateView
|
from django.views.generic import ListView, UpdateView
|
||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
|
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
SearchListMixin,
|
SearchListMixin,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.lib.views import CreateAssignPermView
|
from authentik.lib.views import CreateAssignPermView
|
||||||
from passbook.stages.prompt.forms import PromptAdminForm
|
from authentik.stages.prompt.forms import PromptAdminForm
|
||||||
from passbook.stages.prompt.models import Prompt
|
from authentik.stages.prompt.models import Prompt
|
||||||
|
|
||||||
|
|
||||||
class PromptListView(
|
class PromptListView(
|
||||||
@ -30,7 +30,7 @@ class PromptListView(
|
|||||||
"""Show list of all prompts"""
|
"""Show list of all prompts"""
|
||||||
|
|
||||||
model = Prompt
|
model = Prompt
|
||||||
permission_required = "passbook_stages_prompt.view_prompt"
|
permission_required = "authentik_stages_prompt.view_prompt"
|
||||||
ordering = "order"
|
ordering = "order"
|
||||||
template_name = "administration/stage_prompt/list.html"
|
template_name = "administration/stage_prompt/list.html"
|
||||||
search_fields = [
|
search_fields = [
|
||||||
@ -52,10 +52,10 @@ class PromptCreateView(
|
|||||||
|
|
||||||
model = Prompt
|
model = Prompt
|
||||||
form_class = PromptAdminForm
|
form_class = PromptAdminForm
|
||||||
permission_required = "passbook_stages_prompt.add_prompt"
|
permission_required = "authentik_stages_prompt.add_prompt"
|
||||||
|
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
success_url = reverse_lazy("passbook_admin:stage-prompts")
|
success_url = reverse_lazy("authentik_admin:stage-prompts")
|
||||||
success_message = _("Successfully created Prompt")
|
success_message = _("Successfully created Prompt")
|
||||||
|
|
||||||
|
|
||||||
@ -70,10 +70,10 @@ class PromptUpdateView(
|
|||||||
|
|
||||||
model = Prompt
|
model = Prompt
|
||||||
form_class = PromptAdminForm
|
form_class = PromptAdminForm
|
||||||
permission_required = "passbook_stages_prompt.change_prompt"
|
permission_required = "authentik_stages_prompt.change_prompt"
|
||||||
|
|
||||||
template_name = "generic/update.html"
|
template_name = "generic/update.html"
|
||||||
success_url = reverse_lazy("passbook_admin:stage-prompts")
|
success_url = reverse_lazy("authentik_admin:stage-prompts")
|
||||||
success_message = _("Successfully updated Prompt")
|
success_message = _("Successfully updated Prompt")
|
||||||
|
|
||||||
|
|
||||||
@ -81,8 +81,8 @@ class PromptDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessag
|
|||||||
"""Delete prompt"""
|
"""Delete prompt"""
|
||||||
|
|
||||||
model = Prompt
|
model = Prompt
|
||||||
permission_required = "passbook_stages_prompt.delete_prompt"
|
permission_required = "authentik_stages_prompt.delete_prompt"
|
||||||
|
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:stage-prompts")
|
success_url = reverse_lazy("authentik_admin:stage-prompts")
|
||||||
success_message = _("Successfully deleted Prompt")
|
success_message = _("Successfully deleted Prompt")
|
@ -1,10 +1,10 @@
|
|||||||
"""passbook Tasks List"""
|
"""authentik Tasks List"""
|
||||||
from typing import Any, Dict
|
from typing import Any, Dict
|
||||||
|
|
||||||
from django.views.generic.base import TemplateView
|
from django.views.generic.base import TemplateView
|
||||||
|
|
||||||
from passbook.admin.mixins import AdminRequiredMixin
|
from authentik.admin.mixins import AdminRequiredMixin
|
||||||
from passbook.lib.tasks import TaskInfo, TaskResultStatus
|
from authentik.lib.tasks import TaskInfo, TaskResultStatus
|
||||||
|
|
||||||
|
|
||||||
class TaskListView(AdminRequiredMixin, TemplateView):
|
class TaskListView(AdminRequiredMixin, TemplateView):
|
@ -1,16 +1,16 @@
|
|||||||
"""passbook Token administration"""
|
"""authentik Token administration"""
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
from django.views.generic import ListView
|
from django.views.generic import ListView
|
||||||
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
|
||||||
|
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
SearchListMixin,
|
SearchListMixin,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.core.models import Token
|
from authentik.core.models import Token
|
||||||
|
|
||||||
|
|
||||||
class TokenListView(
|
class TokenListView(
|
||||||
@ -23,7 +23,7 @@ class TokenListView(
|
|||||||
"""Show list of all tokens"""
|
"""Show list of all tokens"""
|
||||||
|
|
||||||
model = Token
|
model = Token
|
||||||
permission_required = "passbook_core.view_token"
|
permission_required = "authentik_core.view_token"
|
||||||
ordering = "expires"
|
ordering = "expires"
|
||||||
template_name = "administration/token/list.html"
|
template_name = "administration/token/list.html"
|
||||||
search_fields = [
|
search_fields = [
|
||||||
@ -38,8 +38,8 @@ class TokenDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessage
|
|||||||
"""Delete token"""
|
"""Delete token"""
|
||||||
|
|
||||||
model = Token
|
model = Token
|
||||||
permission_required = "passbook_core.delete_token"
|
permission_required = "authentik_core.delete_token"
|
||||||
|
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:tokens")
|
success_url = reverse_lazy("authentik_admin:tokens")
|
||||||
success_message = _("Successfully deleted Token")
|
success_message = _("Successfully deleted Token")
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook User administration"""
|
"""authentik User administration"""
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.contrib.auth.mixins import (
|
from django.contrib.auth.mixins import (
|
||||||
@ -18,15 +18,15 @@ from guardian.mixins import (
|
|||||||
get_anonymous_user,
|
get_anonymous_user,
|
||||||
)
|
)
|
||||||
|
|
||||||
from passbook.admin.forms.users import UserForm
|
from authentik.admin.forms.users import UserForm
|
||||||
from passbook.admin.views.utils import (
|
from authentik.admin.views.utils import (
|
||||||
BackSuccessUrlMixin,
|
BackSuccessUrlMixin,
|
||||||
DeleteMessageView,
|
DeleteMessageView,
|
||||||
SearchListMixin,
|
SearchListMixin,
|
||||||
UserPaginateListMixin,
|
UserPaginateListMixin,
|
||||||
)
|
)
|
||||||
from passbook.core.models import Token, User
|
from authentik.core.models import Token, User
|
||||||
from passbook.lib.views import CreateAssignPermView
|
from authentik.lib.views import CreateAssignPermView
|
||||||
|
|
||||||
|
|
||||||
class UserListView(
|
class UserListView(
|
||||||
@ -39,7 +39,7 @@ class UserListView(
|
|||||||
"""Show list of all users"""
|
"""Show list of all users"""
|
||||||
|
|
||||||
model = User
|
model = User
|
||||||
permission_required = "passbook_core.view_user"
|
permission_required = "authentik_core.view_user"
|
||||||
ordering = "username"
|
ordering = "username"
|
||||||
template_name = "administration/user/list.html"
|
template_name = "administration/user/list.html"
|
||||||
search_fields = ["username", "name", "attributes"]
|
search_fields = ["username", "name", "attributes"]
|
||||||
@ -59,10 +59,10 @@ class UserCreateView(
|
|||||||
|
|
||||||
model = User
|
model = User
|
||||||
form_class = UserForm
|
form_class = UserForm
|
||||||
permission_required = "passbook_core.add_user"
|
permission_required = "authentik_core.add_user"
|
||||||
|
|
||||||
template_name = "generic/create.html"
|
template_name = "generic/create.html"
|
||||||
success_url = reverse_lazy("passbook_admin:users")
|
success_url = reverse_lazy("authentik_admin:users")
|
||||||
success_message = _("Successfully created User")
|
success_message = _("Successfully created User")
|
||||||
|
|
||||||
|
|
||||||
@ -77,12 +77,12 @@ class UserUpdateView(
|
|||||||
|
|
||||||
model = User
|
model = User
|
||||||
form_class = UserForm
|
form_class = UserForm
|
||||||
permission_required = "passbook_core.change_user"
|
permission_required = "authentik_core.change_user"
|
||||||
|
|
||||||
# By default the object's name is user which is used by other checks
|
# By default the object's name is user which is used by other checks
|
||||||
context_object_name = "object"
|
context_object_name = "object"
|
||||||
template_name = "generic/update.html"
|
template_name = "generic/update.html"
|
||||||
success_url = reverse_lazy("passbook_admin:users")
|
success_url = reverse_lazy("authentik_admin:users")
|
||||||
success_message = _("Successfully updated User")
|
success_message = _("Successfully updated User")
|
||||||
|
|
||||||
|
|
||||||
@ -90,12 +90,12 @@ class UserDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageV
|
|||||||
"""Delete user"""
|
"""Delete user"""
|
||||||
|
|
||||||
model = User
|
model = User
|
||||||
permission_required = "passbook_core.delete_user"
|
permission_required = "authentik_core.delete_user"
|
||||||
|
|
||||||
# By default the object's name is user which is used by other checks
|
# By default the object's name is user which is used by other checks
|
||||||
context_object_name = "object"
|
context_object_name = "object"
|
||||||
template_name = "generic/delete.html"
|
template_name = "generic/delete.html"
|
||||||
success_url = reverse_lazy("passbook_admin:users")
|
success_url = reverse_lazy("authentik_admin:users")
|
||||||
success_message = _("Successfully deleted User")
|
success_message = _("Successfully deleted User")
|
||||||
|
|
||||||
|
|
||||||
@ -107,12 +107,12 @@ class UserDisableView(
|
|||||||
object: User
|
object: User
|
||||||
|
|
||||||
model = User
|
model = User
|
||||||
permission_required = "passbook_core.update_user"
|
permission_required = "authentik_core.update_user"
|
||||||
|
|
||||||
# By default the object's name is user which is used by other checks
|
# By default the object's name is user which is used by other checks
|
||||||
context_object_name = "object"
|
context_object_name = "object"
|
||||||
template_name = "administration/user/disable.html"
|
template_name = "administration/user/disable.html"
|
||||||
success_url = reverse_lazy("passbook_admin:users")
|
success_url = reverse_lazy("authentik_admin:users")
|
||||||
success_message = _("Successfully disabled User")
|
success_message = _("Successfully disabled User")
|
||||||
|
|
||||||
def delete(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
def delete(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
||||||
@ -131,11 +131,11 @@ class UserEnableView(
|
|||||||
object: User
|
object: User
|
||||||
|
|
||||||
model = User
|
model = User
|
||||||
permission_required = "passbook_core.update_user"
|
permission_required = "authentik_core.update_user"
|
||||||
|
|
||||||
# By default the object's name is user which is used by other checks
|
# By default the object's name is user which is used by other checks
|
||||||
context_object_name = "object"
|
context_object_name = "object"
|
||||||
success_url = reverse_lazy("passbook_admin:users")
|
success_url = reverse_lazy("authentik_admin:users")
|
||||||
success_message = _("Successfully enabled User")
|
success_message = _("Successfully enabled User")
|
||||||
|
|
||||||
def get(self, request: HttpRequest, *args, **kwargs):
|
def get(self, request: HttpRequest, *args, **kwargs):
|
||||||
@ -150,7 +150,7 @@ class UserPasswordResetView(LoginRequiredMixin, PermissionRequiredMixin, DetailV
|
|||||||
"""Get Password reset link for user"""
|
"""Get Password reset link for user"""
|
||||||
|
|
||||||
model = User
|
model = User
|
||||||
permission_required = "passbook_core.reset_user_password"
|
permission_required = "authentik_core.reset_user_password"
|
||||||
|
|
||||||
def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
||||||
"""Create token for user and return link"""
|
"""Create token for user and return link"""
|
||||||
@ -160,9 +160,9 @@ class UserPasswordResetView(LoginRequiredMixin, PermissionRequiredMixin, DetailV
|
|||||||
)
|
)
|
||||||
querystring = urlencode({"token": token.key})
|
querystring = urlencode({"token": token.key})
|
||||||
link = request.build_absolute_uri(
|
link = request.build_absolute_uri(
|
||||||
reverse("passbook_flows:default-recovery") + f"?{querystring}"
|
reverse("authentik_flows:default-recovery") + f"?{querystring}"
|
||||||
)
|
)
|
||||||
messages.success(
|
messages.success(
|
||||||
request, _("Password reset link: <pre>%(link)s</pre>" % {"link": link})
|
request, _("Password reset link: <pre>%(link)s</pre>" % {"link": link})
|
||||||
)
|
)
|
||||||
return redirect("passbook_admin:users")
|
return redirect("authentik_admin:users")
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook admin util views"""
|
"""authentik admin util views"""
|
||||||
from typing import Any, Dict, List, Optional
|
from typing import Any, Dict, List, Optional
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
@ -11,8 +11,8 @@ from django.http.request import HttpRequest
|
|||||||
from django.views.generic import DeleteView, ListView, UpdateView
|
from django.views.generic import DeleteView, ListView, UpdateView
|
||||||
from django.views.generic.list import MultipleObjectMixin
|
from django.views.generic.list import MultipleObjectMixin
|
||||||
|
|
||||||
from passbook.lib.utils.reflection import all_subclasses
|
from authentik.lib.utils.reflection import all_subclasses
|
||||||
from passbook.lib.views import CreateAssignPermView
|
from authentik.lib.views import CreateAssignPermView
|
||||||
|
|
||||||
|
|
||||||
class DeleteMessageView(SuccessMessageMixin, DeleteView):
|
class DeleteMessageView(SuccessMessageMixin, DeleteView):
|
12
authentik/api/apps.py
Normal file
12
authentik/api/apps.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
"""authentik API AppConfig"""
|
||||||
|
|
||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class AuthentikAPIConfig(AppConfig):
|
||||||
|
"""authentik API Config"""
|
||||||
|
|
||||||
|
name = "authentik.api"
|
||||||
|
label = "authentik_api"
|
||||||
|
mountpoint = "api/"
|
||||||
|
verbose_name = "authentik API"
|
@ -6,7 +6,7 @@ from rest_framework.authentication import BaseAuthentication, get_authorization_
|
|||||||
from rest_framework.request import Request
|
from rest_framework.request import Request
|
||||||
from structlog import get_logger
|
from structlog import get_logger
|
||||||
|
|
||||||
from passbook.core.models import Token, TokenIntents, User
|
from authentik.core.models import Token, TokenIntents, User
|
||||||
|
|
||||||
LOGGER = get_logger()
|
LOGGER = get_logger()
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ def token_from_header(raw_header: bytes) -> Optional[Token]:
|
|||||||
return tokens.first()
|
return tokens.first()
|
||||||
|
|
||||||
|
|
||||||
class PassbookTokenAuthentication(BaseAuthentication):
|
class AuthentikTokenAuthentication(BaseAuthentication):
|
||||||
"""Token-based authentication using HTTP Basic authentication"""
|
"""Token-based authentication using HTTP Basic authentication"""
|
||||||
|
|
||||||
def authenticate(self, request: Request) -> Union[Tuple[User, Any], None]:
|
def authenticate(self, request: Request) -> Union[Tuple[User, Any], None]:
|
||||||
@ -54,4 +54,4 @@ class PassbookTokenAuthentication(BaseAuthentication):
|
|||||||
return (token.user, None)
|
return (token.user, None)
|
||||||
|
|
||||||
def authenticate_header(self, request: Request) -> str:
|
def authenticate_header(self, request: Request) -> str:
|
||||||
return 'Basic realm="passbook"'
|
return 'Basic realm="authentik"'
|
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
{% block branding %}
|
{% block branding %}
|
||||||
<span class='navbar-brand'>
|
<span class='navbar-brand'>
|
||||||
passbook
|
authentik
|
||||||
</span>
|
</span>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,7 +1,7 @@
|
|||||||
"""passbook api urls"""
|
"""authentik api urls"""
|
||||||
from django.urls import include, path
|
from django.urls import include, path
|
||||||
|
|
||||||
from passbook.api.v2.urls import urlpatterns as v2_urls
|
from authentik.api.v2.urls import urlpatterns as v2_urls
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("v2beta/", include(v2_urls)),
|
path("v2beta/", include(v2_urls)),
|
@ -6,11 +6,11 @@ from rest_framework.response import Response
|
|||||||
from rest_framework.serializers import ReadOnlyField, Serializer
|
from rest_framework.serializers import ReadOnlyField, Serializer
|
||||||
from rest_framework.viewsets import ViewSet
|
from rest_framework.viewsets import ViewSet
|
||||||
|
|
||||||
from passbook.lib.config import CONFIG
|
from authentik.lib.config import CONFIG
|
||||||
|
|
||||||
|
|
||||||
class ConfigSerializer(Serializer):
|
class ConfigSerializer(Serializer):
|
||||||
"""Serialize passbook Config into DRF Object"""
|
"""Serialize authentik Config into DRF Object"""
|
||||||
|
|
||||||
branding_logo = ReadOnlyField()
|
branding_logo = ReadOnlyField()
|
||||||
branding_title = ReadOnlyField()
|
branding_title = ReadOnlyField()
|
||||||
@ -36,8 +36,8 @@ class ConfigsViewSet(ViewSet):
|
|||||||
"""Retrive public configuration options"""
|
"""Retrive public configuration options"""
|
||||||
config = ConfigSerializer(
|
config = ConfigSerializer(
|
||||||
{
|
{
|
||||||
"branding_logo": CONFIG.y("passbook.branding.logo"),
|
"branding_logo": CONFIG.y("authentik.branding.logo"),
|
||||||
"branding_title": CONFIG.y("passbook.branding.title"),
|
"branding_title": CONFIG.y("authentik.branding.title"),
|
||||||
"error_reporting_enabled": CONFIG.y("error_reporting.enabled"),
|
"error_reporting_enabled": CONFIG.y("error_reporting.enabled"),
|
||||||
"error_reporting_environment": CONFIG.y("error_reporting.environment"),
|
"error_reporting_environment": CONFIG.y("error_reporting.environment"),
|
||||||
"error_reporting_send_pii": CONFIG.y("error_reporting.send_pii"),
|
"error_reporting_send_pii": CONFIG.y("error_reporting.send_pii"),
|
@ -5,55 +5,58 @@ from drf_yasg2.views import get_schema_view
|
|||||||
from rest_framework import routers
|
from rest_framework import routers
|
||||||
from rest_framework.permissions import AllowAny
|
from rest_framework.permissions import AllowAny
|
||||||
|
|
||||||
from passbook.admin.api.overview import AdministrationOverviewViewSet
|
from authentik.admin.api.overview import AdministrationOverviewViewSet
|
||||||
from passbook.admin.api.overview_metrics import AdministrationMetricsViewSet
|
from authentik.admin.api.overview_metrics import AdministrationMetricsViewSet
|
||||||
from passbook.admin.api.tasks import TaskViewSet
|
from authentik.admin.api.tasks import TaskViewSet
|
||||||
from passbook.api.v2.config import ConfigsViewSet
|
from authentik.api.v2.config import ConfigsViewSet
|
||||||
from passbook.api.v2.messages import MessagesViewSet
|
from authentik.api.v2.messages import MessagesViewSet
|
||||||
from passbook.audit.api import EventViewSet
|
from authentik.audit.api import EventViewSet
|
||||||
from passbook.core.api.applications import ApplicationViewSet
|
from authentik.core.api.applications import ApplicationViewSet
|
||||||
from passbook.core.api.groups import GroupViewSet
|
from authentik.core.api.groups import GroupViewSet
|
||||||
from passbook.core.api.propertymappings import PropertyMappingViewSet
|
from authentik.core.api.propertymappings import PropertyMappingViewSet
|
||||||
from passbook.core.api.providers import ProviderViewSet
|
from authentik.core.api.providers import ProviderViewSet
|
||||||
from passbook.core.api.sources import SourceViewSet
|
from authentik.core.api.sources import SourceViewSet
|
||||||
from passbook.core.api.tokens import TokenViewSet
|
from authentik.core.api.tokens import TokenViewSet
|
||||||
from passbook.core.api.users import UserViewSet
|
from authentik.core.api.users import UserViewSet
|
||||||
from passbook.crypto.api import CertificateKeyPairViewSet
|
from authentik.crypto.api import CertificateKeyPairViewSet
|
||||||
from passbook.flows.api import FlowStageBindingViewSet, FlowViewSet, StageViewSet
|
from authentik.flows.api import FlowStageBindingViewSet, FlowViewSet, StageViewSet
|
||||||
from passbook.outposts.api import (
|
from authentik.outposts.api import (
|
||||||
DockerServiceConnectionViewSet,
|
DockerServiceConnectionViewSet,
|
||||||
KubernetesServiceConnectionViewSet,
|
KubernetesServiceConnectionViewSet,
|
||||||
OutpostViewSet,
|
OutpostViewSet,
|
||||||
)
|
)
|
||||||
from passbook.policies.api import PolicyBindingViewSet, PolicyViewSet
|
from authentik.policies.api import PolicyBindingViewSet, PolicyViewSet
|
||||||
from passbook.policies.dummy.api import DummyPolicyViewSet
|
from authentik.policies.dummy.api import DummyPolicyViewSet
|
||||||
from passbook.policies.expiry.api import PasswordExpiryPolicyViewSet
|
from authentik.policies.expiry.api import PasswordExpiryPolicyViewSet
|
||||||
from passbook.policies.expression.api import ExpressionPolicyViewSet
|
from authentik.policies.expression.api import ExpressionPolicyViewSet
|
||||||
from passbook.policies.group_membership.api import GroupMembershipPolicyViewSet
|
from authentik.policies.group_membership.api import GroupMembershipPolicyViewSet
|
||||||
from passbook.policies.hibp.api import HaveIBeenPwendPolicyViewSet
|
from authentik.policies.hibp.api import HaveIBeenPwendPolicyViewSet
|
||||||
from passbook.policies.password.api import PasswordPolicyViewSet
|
from authentik.policies.password.api import PasswordPolicyViewSet
|
||||||
from passbook.policies.reputation.api import ReputationPolicyViewSet
|
from authentik.policies.reputation.api import ReputationPolicyViewSet
|
||||||
from passbook.providers.oauth2.api import OAuth2ProviderViewSet, ScopeMappingViewSet
|
from authentik.providers.oauth2.api import OAuth2ProviderViewSet, ScopeMappingViewSet
|
||||||
from passbook.providers.proxy.api import ProxyOutpostConfigViewSet, ProxyProviderViewSet
|
from authentik.providers.proxy.api import (
|
||||||
from passbook.providers.saml.api import SAMLPropertyMappingViewSet, SAMLProviderViewSet
|
ProxyOutpostConfigViewSet,
|
||||||
from passbook.sources.ldap.api import LDAPPropertyMappingViewSet, LDAPSourceViewSet
|
ProxyProviderViewSet,
|
||||||
from passbook.sources.oauth.api import OAuthSourceViewSet
|
)
|
||||||
from passbook.sources.saml.api import SAMLSourceViewSet
|
from authentik.providers.saml.api import SAMLPropertyMappingViewSet, SAMLProviderViewSet
|
||||||
from passbook.stages.captcha.api import CaptchaStageViewSet
|
from authentik.sources.ldap.api import LDAPPropertyMappingViewSet, LDAPSourceViewSet
|
||||||
from passbook.stages.consent.api import ConsentStageViewSet
|
from authentik.sources.oauth.api import OAuthSourceViewSet
|
||||||
from passbook.stages.dummy.api import DummyStageViewSet
|
from authentik.sources.saml.api import SAMLSourceViewSet
|
||||||
from passbook.stages.email.api import EmailStageViewSet
|
from authentik.stages.captcha.api import CaptchaStageViewSet
|
||||||
from passbook.stages.identification.api import IdentificationStageViewSet
|
from authentik.stages.consent.api import ConsentStageViewSet
|
||||||
from passbook.stages.invitation.api import InvitationStageViewSet, InvitationViewSet
|
from authentik.stages.dummy.api import DummyStageViewSet
|
||||||
from passbook.stages.otp_static.api import OTPStaticStageViewSet
|
from authentik.stages.email.api import EmailStageViewSet
|
||||||
from passbook.stages.otp_time.api import OTPTimeStageViewSet
|
from authentik.stages.identification.api import IdentificationStageViewSet
|
||||||
from passbook.stages.otp_validate.api import OTPValidateStageViewSet
|
from authentik.stages.invitation.api import InvitationStageViewSet, InvitationViewSet
|
||||||
from passbook.stages.password.api import PasswordStageViewSet
|
from authentik.stages.otp_static.api import OTPStaticStageViewSet
|
||||||
from passbook.stages.prompt.api import PromptStageViewSet, PromptViewSet
|
from authentik.stages.otp_time.api import OTPTimeStageViewSet
|
||||||
from passbook.stages.user_delete.api import UserDeleteStageViewSet
|
from authentik.stages.otp_validate.api import OTPValidateStageViewSet
|
||||||
from passbook.stages.user_login.api import UserLoginStageViewSet
|
from authentik.stages.password.api import PasswordStageViewSet
|
||||||
from passbook.stages.user_logout.api import UserLogoutStageViewSet
|
from authentik.stages.prompt.api import PromptStageViewSet, PromptViewSet
|
||||||
from passbook.stages.user_write.api import UserWriteStageViewSet
|
from authentik.stages.user_delete.api import UserDeleteStageViewSet
|
||||||
|
from authentik.stages.user_login.api import UserLoginStageViewSet
|
||||||
|
from authentik.stages.user_logout.api import UserLogoutStageViewSet
|
||||||
|
from authentik.stages.user_write.api import UserWriteStageViewSet
|
||||||
|
|
||||||
router = routers.DefaultRouter()
|
router = routers.DefaultRouter()
|
||||||
|
|
||||||
@ -131,7 +134,7 @@ router.register("stages/dummy", DummyStageViewSet)
|
|||||||
router.register("policies/dummy", DummyPolicyViewSet)
|
router.register("policies/dummy", DummyPolicyViewSet)
|
||||||
|
|
||||||
info = openapi.Info(
|
info = openapi.Info(
|
||||||
title="passbook API",
|
title="authentik API",
|
||||||
default_version="v2",
|
default_version="v2",
|
||||||
contact=openapi.Contact(email="hello@beryju.org"),
|
contact=openapi.Contact(email="hello@beryju.org"),
|
||||||
license=openapi.License(name="MIT License"),
|
license=openapi.License(name="MIT License"),
|
@ -9,7 +9,7 @@ from rest_framework.response import Response
|
|||||||
from rest_framework.serializers import ModelSerializer, Serializer
|
from rest_framework.serializers import ModelSerializer, Serializer
|
||||||
from rest_framework.viewsets import ReadOnlyModelViewSet
|
from rest_framework.viewsets import ReadOnlyModelViewSet
|
||||||
|
|
||||||
from passbook.audit.models import Event, EventAction
|
from authentik.audit.models import Event, EventAction
|
||||||
|
|
||||||
|
|
||||||
class EventSerializer(ModelSerializer):
|
class EventSerializer(ModelSerializer):
|
16
authentik/audit/apps.py
Normal file
16
authentik/audit/apps.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
"""authentik audit app"""
|
||||||
|
from importlib import import_module
|
||||||
|
|
||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class AuthentikAuditConfig(AppConfig):
|
||||||
|
"""authentik audit app"""
|
||||||
|
|
||||||
|
name = "authentik.audit"
|
||||||
|
label = "authentik_audit"
|
||||||
|
verbose_name = "authentik Audit"
|
||||||
|
mountpoint = "audit/"
|
||||||
|
|
||||||
|
def ready(self):
|
||||||
|
import_module("authentik.audit.signals")
|
@ -7,9 +7,9 @@ from django.db.models import Model
|
|||||||
from django.db.models.signals import post_save, pre_delete
|
from django.db.models.signals import post_save, pre_delete
|
||||||
from django.http import HttpRequest, HttpResponse
|
from django.http import HttpRequest, HttpResponse
|
||||||
|
|
||||||
from passbook.audit.models import Event, EventAction, model_to_dict
|
from authentik.audit.models import Event, EventAction, model_to_dict
|
||||||
from passbook.audit.signals import EventNewThread
|
from authentik.audit.signals import EventNewThread
|
||||||
from passbook.core.middleware import LOCAL
|
from authentik.core.middleware import LOCAL
|
||||||
|
|
||||||
|
|
||||||
class AuditMiddleware:
|
class AuditMiddleware:
|
||||||
@ -34,27 +34,27 @@ class AuditMiddleware:
|
|||||||
)
|
)
|
||||||
post_save.connect(
|
post_save.connect(
|
||||||
post_save_handler,
|
post_save_handler,
|
||||||
dispatch_uid=LOCAL.passbook["request_id"],
|
dispatch_uid=LOCAL.authentik["request_id"],
|
||||||
weak=False,
|
weak=False,
|
||||||
)
|
)
|
||||||
pre_delete.connect(
|
pre_delete.connect(
|
||||||
pre_delete_handler,
|
pre_delete_handler,
|
||||||
dispatch_uid=LOCAL.passbook["request_id"],
|
dispatch_uid=LOCAL.authentik["request_id"],
|
||||||
weak=False,
|
weak=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
response = self.get_response(request)
|
response = self.get_response(request)
|
||||||
|
|
||||||
post_save.disconnect(dispatch_uid=LOCAL.passbook["request_id"])
|
post_save.disconnect(dispatch_uid=LOCAL.authentik["request_id"])
|
||||||
pre_delete.disconnect(dispatch_uid=LOCAL.passbook["request_id"])
|
pre_delete.disconnect(dispatch_uid=LOCAL.authentik["request_id"])
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
def process_exception(self, request: HttpRequest, exception: Exception):
|
def process_exception(self, request: HttpRequest, exception: Exception):
|
||||||
"""Unregister handlers in case of exception"""
|
"""Unregister handlers in case of exception"""
|
||||||
post_save.disconnect(dispatch_uid=LOCAL.passbook["request_id"])
|
post_save.disconnect(dispatch_uid=LOCAL.authentik["request_id"])
|
||||||
pre_delete.disconnect(dispatch_uid=LOCAL.passbook["request_id"])
|
pre_delete.disconnect(dispatch_uid=LOCAL.authentik["request_id"])
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
@ -6,7 +6,7 @@ from django.db import migrations, models
|
|||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("passbook_audit", "0001_initial"),
|
("authentik_audit", "0001_initial"),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
@ -3,11 +3,11 @@ from django.apps.registry import Apps
|
|||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
|
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
|
||||||
|
|
||||||
import passbook.audit.models
|
import authentik.audit.models
|
||||||
|
|
||||||
|
|
||||||
def convert_user_to_json(apps: Apps, schema_editor: BaseDatabaseSchemaEditor):
|
def convert_user_to_json(apps: Apps, schema_editor: BaseDatabaseSchemaEditor):
|
||||||
Event = apps.get_model("passbook_audit", "Event")
|
Event = apps.get_model("authentik_audit", "Event")
|
||||||
|
|
||||||
db_alias = schema_editor.connection.alias
|
db_alias = schema_editor.connection.alias
|
||||||
for event in Event.objects.all():
|
for event in Event.objects.all():
|
||||||
@ -15,7 +15,7 @@ def convert_user_to_json(apps: Apps, schema_editor: BaseDatabaseSchemaEditor):
|
|||||||
# Because event objects cannot be updated, we have to re-create them
|
# Because event objects cannot be updated, we have to re-create them
|
||||||
event.pk = None
|
event.pk = None
|
||||||
event.user_json = (
|
event.user_json = (
|
||||||
passbook.audit.models.get_user(event.user) if event.user else {}
|
authentik.audit.models.get_user(event.user) if event.user else {}
|
||||||
)
|
)
|
||||||
event._state.adding = True
|
event._state.adding = True
|
||||||
event.save()
|
event.save()
|
||||||
@ -24,7 +24,7 @@ def convert_user_to_json(apps: Apps, schema_editor: BaseDatabaseSchemaEditor):
|
|||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("passbook_audit", "0002_auto_20200918_2116"),
|
("authentik_audit", "0002_auto_20200918_2116"),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
@ -6,7 +6,7 @@ from django.db import migrations, models
|
|||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("passbook_audit", "0003_auto_20200917_1155"),
|
("authentik_audit", "0003_auto_20200917_1155"),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
@ -6,7 +6,7 @@ from django.db import migrations, models
|
|||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("passbook_audit", "0004_auto_20200921_1829"),
|
("authentik_audit", "0004_auto_20200921_1829"),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
@ -6,7 +6,7 @@ from django.db import migrations, models
|
|||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("passbook_audit", "0005_auto_20201005_2139"),
|
("authentik_audit", "0005_auto_20201005_2139"),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
@ -1,4 +1,4 @@
|
|||||||
"""passbook audit models"""
|
"""authentik audit models"""
|
||||||
from inspect import getmodule, stack
|
from inspect import getmodule, stack
|
||||||
from typing import Any, Dict, Optional, Union
|
from typing import Any, Dict, Optional, Union
|
||||||
from uuid import UUID, uuid4
|
from uuid import UUID, uuid4
|
||||||
@ -14,14 +14,14 @@ from django.views.debug import SafeExceptionReporterFilter
|
|||||||
from guardian.utils import get_anonymous_user
|
from guardian.utils import get_anonymous_user
|
||||||
from structlog import get_logger
|
from structlog import get_logger
|
||||||
|
|
||||||
from passbook.core.middleware import (
|
from authentik.core.middleware import (
|
||||||
SESSION_IMPERSONATE_ORIGINAL_USER,
|
SESSION_IMPERSONATE_ORIGINAL_USER,
|
||||||
SESSION_IMPERSONATE_USER,
|
SESSION_IMPERSONATE_USER,
|
||||||
)
|
)
|
||||||
from passbook.core.models import User
|
from authentik.core.models import User
|
||||||
from passbook.lib.utils.http import get_client_ip
|
from authentik.lib.utils.http import get_client_ip
|
||||||
|
|
||||||
LOGGER = get_logger("passbook.audit")
|
LOGGER = get_logger("authentik.audit")
|
||||||
|
|
||||||
|
|
||||||
def cleanse_dict(source: Dict[Any, Any]) -> Dict[Any, Any]:
|
def cleanse_dict(source: Dict[Any, Any]) -> Dict[Any, Any]:
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user