Skip to content

user-management#37

Merged
smalex-z merged 3 commits into
mainfrom
user-management
Mar 11, 2026
Merged

user-management#37
smalex-z merged 3 commits into
mainfrom
user-management

Conversation

@usecymk

@usecymk usecymk commented Mar 11, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds a basic user management system: create users and change passwords, with users stored in Postgres. User management is optional and only enabled when DATABASE_URL is set.

Resolves Issue #16

Changes Made

  • API: Postgres-backed user store (api/db/db.go): list users, create user (bcrypt), change password. Endpoints: GET/POST /api/users, PUT /api/users/:id/password. Enabled only when DATABASE_URL is set.
  • Frontend: "Users" item in dashboard nav; Users page with user list, "Add user" form, and per-user "Change password" (inline).
  • Deploy: Install script sets up Postgres (Docker) and /opt/altsuite/env when Docker is present so user management works out of the box. Update script ensures Postgres is running if present; uninstall stops the user-management Postgres container.
  • Docs: README updated for user management (auto-setup and manual option).
  • Tests: api/db/db_test.go for user DB operations; Go workflow updated with Postgres service and DATABASE_URL so these tests run in CI.

Testing

  • Tested locally (API + frontend + Postgres)
  • Added/updated unit tests (db package tests; Go workflow runs them with Postgres)
  • All tests passing

Screenshots

iScreen Shoter - Vivaldi - 260311133650

@gitguardian

gitguardian Bot commented Mar 11, 2026

Copy link
Copy Markdown

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@usecymk usecymk requested a review from smalex-z March 11, 2026 20:46
@usecymk

usecymk commented Mar 11, 2026

Copy link
Copy Markdown
Collaborator Author

@smalex-z waiting on approval for this

@smalex-z

Copy link
Copy Markdown
Owner

@smalex-z waiting on approval for this

will review in ~15 minutes when i get back. is there initial user setup?

- API: Postgres-backed user store (list/create/change password), GET/POST /api/users, PUT /api/users/:id/password
- Frontend: Users nav and page (list, add user, change password)
- Deploy: Install sets up Postgres and env when Docker present; update/uninstall handle Postgres; no hardcoded secrets
- Tests: db package tests; Go workflow uses TEST_POSTGRES_PASSWORD secret for CI
- Docs: README and docker-compose comments updated

Made-with: Cursor

@smalex-z smalex-z left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@github-actions

Copy link
Copy Markdown

Unit tests run: 76
Unit tests passed: 76
Test coverage: 30.4%

@smalex-z smalex-z merged commit d783b1b into main Mar 11, 2026
5 checks passed
@smalex-z smalex-z deleted the user-management branch March 11, 2026 23:34
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