[PR #437] [MERGED] feat: disable/enable users #810

Closed
opened 2025-10-08 00:17:36 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pocket-id/pocket-id/pull/437
Author: @kmendell
Created: 4/13/2025
Status: Merged
Merged: 4/18/2025
Merged by: @kmendell

Base: mainHead: feat/disable-users


📝 Commits (10+)

  • 3cd6e0b feat: initial work on disabling users
  • 4ec19ca make sure ldap users show as disabled in list
  • 218a96a make sure ldap users get re-enabled
  • 2dfad32 remove un-needed loggin
  • 129e29c Merge branch 'main' into feat/disable-users
  • 3246dd0 Merge branch 'main' into feat/disable-users
  • c1ed744 use single endpoint for setting user attributes
  • 22a86fb only show enable/disable button for local users
  • 5988b29 add LdapSoftDeleteUsers to AppConfigDto
  • a24ddaf fix formatting in message file

📊 Changes

24 files changed (+245 additions, -56 deletions)

View changed files

📝 backend/internal/bootstrap/router_bootstrap.go (+1 -1)
📝 backend/internal/common/errors.go (+14 -10)
📝 backend/internal/dto/app_config_dto.go (+1 -0)
📝 backend/internal/dto/user_dto.go (+2 -0)
📝 backend/internal/middleware/api_key_auth.go (+4 -1)
📝 backend/internal/middleware/auth_middleware.go (+8 -4)
📝 backend/internal/middleware/jwt_auth.go (+12 -7)
📝 backend/internal/model/app_config.go (+1 -0)
📝 backend/internal/model/user.go (+1 -0)
📝 backend/internal/service/app_config_service.go (+1 -0)
📝 backend/internal/service/ldap_service.go (+31 -7)
📝 backend/internal/service/user_service.go (+40 -7)
📝 backend/internal/service/webauthn_service.go (+4 -0)
backend/resources/migrations/postgres/20250412000000_add_user_disabled_field.down.sql (+4 -0)
backend/resources/migrations/postgres/20250412000000_add_user_disabled_field.up.sql (+2 -0)
backend/resources/migrations/sqlite/20250412000000_add_user_disabled_field.down.sql (+4 -0)
backend/resources/migrations/sqlite/20250412000000_add_user_disabled_field.up.sql (+2 -0)
📝 frontend/messages/en-US.json (+10 -1)
📝 frontend/src/lib/types/application-configuration.ts (+1 -0)
📝 frontend/src/lib/types/user.type.ts (+1 -0)

...and 4 more files

📄 Description

Fixes: https://github.com/pocket-id/pocket-id/issues/404


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/pocket-id/pocket-id/pull/437 **Author:** [@kmendell](https://github.com/kmendell) **Created:** 4/13/2025 **Status:** ✅ Merged **Merged:** 4/18/2025 **Merged by:** [@kmendell](https://github.com/kmendell) **Base:** `main` ← **Head:** `feat/disable-users` --- ### 📝 Commits (10+) - [`3cd6e0b`](https://github.com/pocket-id/pocket-id/commit/3cd6e0b6f9ed3d43fabfafb0f50359dba9fbc53f) feat: initial work on disabling users - [`4ec19ca`](https://github.com/pocket-id/pocket-id/commit/4ec19cad698a52028466c02ab507ea1def883a61) make sure ldap users show as disabled in list - [`218a96a`](https://github.com/pocket-id/pocket-id/commit/218a96a8b1ea0a396f5786338c451f79193aeaf0) make sure ldap users get re-enabled - [`2dfad32`](https://github.com/pocket-id/pocket-id/commit/2dfad32d2df1be2335a9c12f5b7de19c061d516f) remove un-needed loggin - [`129e29c`](https://github.com/pocket-id/pocket-id/commit/129e29c5e0b14638820bb959d70feb86bae8bba0) Merge branch 'main' into feat/disable-users - [`3246dd0`](https://github.com/pocket-id/pocket-id/commit/3246dd0406473404295beab572c767fe295dae17) Merge branch 'main' into feat/disable-users - [`c1ed744`](https://github.com/pocket-id/pocket-id/commit/c1ed7442680789bb21ff98af466bb7f63f949577) use single endpoint for setting user attributes - [`22a86fb`](https://github.com/pocket-id/pocket-id/commit/22a86fbf85b98a82c0ee6ada3df8e91183505a60) only show enable/disable button for local users - [`5988b29`](https://github.com/pocket-id/pocket-id/commit/5988b29daac52666bb95afcf5a072e07394dd2f4) add LdapSoftDeleteUsers to AppConfigDto - [`a24ddaf`](https://github.com/pocket-id/pocket-id/commit/a24ddafb9fbd155f6f871653cff30ca68b3f7195) fix formatting in message file ### 📊 Changes **24 files changed** (+245 additions, -56 deletions) <details> <summary>View changed files</summary> 📝 `backend/internal/bootstrap/router_bootstrap.go` (+1 -1) 📝 `backend/internal/common/errors.go` (+14 -10) 📝 `backend/internal/dto/app_config_dto.go` (+1 -0) 📝 `backend/internal/dto/user_dto.go` (+2 -0) 📝 `backend/internal/middleware/api_key_auth.go` (+4 -1) 📝 `backend/internal/middleware/auth_middleware.go` (+8 -4) 📝 `backend/internal/middleware/jwt_auth.go` (+12 -7) 📝 `backend/internal/model/app_config.go` (+1 -0) 📝 `backend/internal/model/user.go` (+1 -0) 📝 `backend/internal/service/app_config_service.go` (+1 -0) 📝 `backend/internal/service/ldap_service.go` (+31 -7) 📝 `backend/internal/service/user_service.go` (+40 -7) 📝 `backend/internal/service/webauthn_service.go` (+4 -0) ➕ `backend/resources/migrations/postgres/20250412000000_add_user_disabled_field.down.sql` (+4 -0) ➕ `backend/resources/migrations/postgres/20250412000000_add_user_disabled_field.up.sql` (+2 -0) ➕ `backend/resources/migrations/sqlite/20250412000000_add_user_disabled_field.down.sql` (+4 -0) ➕ `backend/resources/migrations/sqlite/20250412000000_add_user_disabled_field.up.sql` (+2 -0) 📝 `frontend/messages/en-US.json` (+10 -1) 📝 `frontend/src/lib/types/application-configuration.ts` (+1 -0) 📝 `frontend/src/lib/types/user.type.ts` (+1 -0) _...and 4 more files_ </details> ### 📄 Description Fixes: https://github.com/pocket-id/pocket-id/issues/404 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2025-10-08 00:17:36 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-1#810