core: don't fail migrations if no pbadmin exists

This commit is contained in:
Jens Langhammer 2020-09-15 23:37:39 +02:00
parent 0a5e14a352
commit ea9687c30b
5 changed files with 9 additions and 5 deletions

View File

@ -1,6 +1,6 @@
# VMware vSphere Integration
# VMware vCenter Integration
## What is vSphere
## What is vCenter
From https://en.wikipedia.org/wiki/VCenter
@ -12,6 +12,10 @@ From https://en.wikipedia.org/wiki/VCenter
This requires passbook 0.10.3 or newer.
!!! warning
This requires VMware vCenter 7.0.0 or newer.
## Preparation
The following placeholders will be used:
@ -23,7 +27,7 @@ Since vCenter only allows OpenID-Connect in combination with Active Directory, i
### Step 1
Under *Property Mappings*, create a *Scope Mapping*. Give it a name like "OIDC-Scope-VMware-vSphere". Set the scope name to `openid` and the expression to the following
Under *Property Mappings*, create a *Scope Mapping*. Give it a name like "OIDC-Scope-VMware-vCenter". Set the scope name to `openid` and the expression to the following
```python
return {

View File

Before

Width:  |  Height:  |  Size: 173 KiB

After

Width:  |  Height:  |  Size: 173 KiB

View File

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

View File

@ -52,7 +52,7 @@ nav:
- Harbor: integrations/services/harbor/index.md
- Sentry: integrations/services/sentry/index.md
- Ansible Tower/AWX: integrations/services/tower-awx/index.md
- VMware vSphere: integrations/services/vmware-vsphere/index.md
- VMware vCenter: integrations/services/vmware-vcenter/index.md
- Upgrading:
- to 0.9: upgrading/to-0.9.md
- to 0.10: upgrading/to-0.10.md

View File

@ -13,7 +13,7 @@ def create_default_admin_group(apps: Apps, schema_editor: BaseDatabaseSchemaEdit
group, _ = Group.objects.using(db_alias).get_or_create(
is_superuser=True, defaults={"name": "passbook Admins",}
)
group.users.add(User.objects.get(username="pbadmin"))
group.users.set(User.objects.filter(username="pbadmin"))
group.save()