subspacecommunity / subspace

A fork of the simple WireGuard VPN server GUI community maintained

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Normal users get error on successful device profile deletion

jpbostic opened this issue · comments

Describe the bug

When a normal user (logged in via SAML) deletes a device profile, they get an error page, even though the deletion is successful.

To Reproduce

Steps to reproduce the behavior:

  1. Run docker image 1.3.2 (subspacecommunity/subspace:1.3.2 which is from commit a996119) and configure for SAML
  2. Login via SAML as normal user and add device profiles
  3. Attempt to delete one of the device profiles (works but an error page is shown)
  4. Logout and then login as admin user
  5. Attempt to delete one of the device profiles for the normal user above (works with no errors)

Note

Expected behavior

Profile deletion should work with no errors for both a normal user and an admin editing that user's account or device profiles.

Screenshots

Screenshot_from_2020-09-02_17-27-57 01
Screenshot_from_2020-09-02_17-28-12 01

Desktop (please complete the following information):

NA - error is not client platform specific.

Smartphone (please complete the following information):

NA - error is not client platform specific.

Additional context

To diagnose this issue, I ran subspace in debug mode inside the docker container, which helped locate the issue, which is in the "profileDeleteHandler" method in cmd/subspace/handlers.go . Will submit pull request with a fix.