-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't delete oauth users or set them to admin #259
Comments
If you point me in the right direction, I'll take a look at submitting a PR. |
Suppose, there is no toggle because user is synced from external provider, in your case Authentik. |
@bonddim I gave that a shot, but it's not working (I'm deleting the user in between sign ins; should be fresh auth:
callback_url_prefix: https://<my-url>/api/v0
oidc:
- id: authentik
provider_name: authentik
display_name: Login with Authentik
base_url: https://<my-authentik-url>/application/o/wireguard-portal/
client_id: my-client-id
client_secret: my-super-secret-client-secret
extra_scopes:
- profile
- email
- is_admin
field_map:
email: email
user_identifier: email
registration_enabled: true I then have a Property Mapping with the scope return str(ak_is_group_member(request.user, name="Administrators")).lower() Here's the test output: Not quite sure where I went wrong. For now I'll manually update in the DB. |
Gave it a shot with |
@joestump , |
@bonddim if I'm following the code correctly, that would result in |
@joestump, By providing ....
field_map:
is_admin: is_admin
... |
@joestump did you manage to get it working? |
Chiming in here since OP is awol, i have the same setup as the user and i am still not able to get this working. I have set the field_map for is_admin.
A bit ulrelated but when creating peers with a user that is not admin with self_provisioning_allowed: true i immediately get logged out of wgportal with error below from the browser console.
when using oauth i also get the same issue OP has where the redirect url is wrong Accessing /api works but /api/v0 gives 404 not found https://wgportal.local.domain.test/api/v0 |
Ironically, I can delete myself as the admin. 😄
When I log in as the main admin (as defined in
config.yml
), I am unable to upgrade privileges to users who've logged in via Authentik. The toggle is missing from the edit screen.I suspect it's just a component being gated? I looked at the code and there's a whole form with data being loaded, but I only see that when the user was created via DB.
The text was updated successfully, but these errors were encountered: