Skip to content

Reintroduce user update api path#552

Merged
moebiusband73 merged 4 commits into
mainfrom
fix/add-user-edit-api
Jun 4, 2026
Merged

Reintroduce user update api path#552
moebiusband73 merged 4 commits into
mainfrom
fix/add-user-edit-api

Conversation

@spacehamster87
Copy link
Copy Markdown
Contributor

Reintroduced user update via REST API. Marked as draft for refinement or discussion before merging.

Details

  • POST via r.Post("/user/{id}", api.updateUserByRequest) in rest.go:83.
  • Uses username query param ( {id} ) and JSON Payload (UpdateUserAPIRequest).
  • Secured via TokenAuth and additional APIAllowedIPs array if configured.

Caveats

  • Updates are handled as single changes for one defined user-id, i.e.
    • Post to /user/user001 using
      • Payload {"add-role": "user"} or
      • Payload {"remove-role": "user"} or
      • Payload {"add-project": "abcd100"} or
      • Payload {"remove-project": "abcd100"}
  • Token User requires both API and Admin roles at the moment, similar to form based updates in admin frontend interface

Summary Table

Token roles AuthAPI Handler Result
[API] only ✓ passes 403 Forbidden known intentional block
[Admin, API] ✓ passes ✓ passes only working path
[Admin] only 401 Unauthorized blocked at middleware
no roles / other 401 Unauthorized blocked at middleware

@moebiusband73 moebiusband73 marked this pull request as ready for review June 4, 2026 06:26
@moebiusband73 moebiusband73 merged commit cdb4f06 into main Jun 4, 2026
2 checks passed
@moebiusband73 moebiusband73 deleted the fix/add-user-edit-api branch June 4, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants