mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[PR #1193] [CLOSED] server,app: add user account disable/enable functionality #1173
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#1173
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/lldap/lldap/pull/1193
Author: @coolguy1771
Created: 6/24/2025
Status: ❌ Closed
Base:
main← Head:feature/user-account-disable📝 Commits (10+)
a1205b8server,app: add user account disable/enable functionalitye91f706chore: run cargo formattingba99bc7fix: revert version to 0.6.2-alpha in Cargo.toml for app and serverc8a31f1fix: revert lldap and lldap_app versions to 0.6.2-alpha in Cargo.lockc031b7efeat: Implement login_enabled attribute for user management126f20dfeat: Add session-aware backend handler to manage user session invalidation on login status change421921dMerge branch 'main' into feature/user-account-disable36576ccRefactor access control logic and improve error messages6d961a1Update server/src/session_aware_backend_handler.rs2978369Update app/src/components/user_details_form.rs📊 Changes
39 files changed (+1596 additions, -92 deletions)
View changed files
📝
app/queries/get_user_details.graphql(+1 -0)📝
app/queries/list_users.graphql(+1 -0)➕
app/queries/set_user_login_enabled.graphql(+5 -0)📝
app/src/components/form/attribute_input.rs(+41 -7)📝
app/src/components/form/date_input.rs(+16 -5)📝
app/src/components/form/file_input.rs(+13 -1)📝
app/src/components/user_details_form.rs(+1 -0)📝
app/src/components/user_table.rs(+12 -0)📝
app/src/infra/schema.rs(+1 -0)📝
crates/access-control/src/lib.rs(+13 -6)📝
crates/auth/src/access_control.rs(+6 -0)📝
crates/domain-model/src/model/deserialize.rs(+6 -0)📝
crates/domain-model/src/model/users.rs(+5 -0)📝
crates/domain/src/deserialize.rs(+9 -0)📝
crates/domain/src/public_schema.rs(+9 -0)📝
crates/domain/src/requests.rs(+1 -0)📝
crates/domain/src/types.rs(+25 -0)📝
crates/graphql-server/Cargo.toml(+7 -3)📝
crates/graphql-server/src/api.rs(+19 -15)📝
crates/graphql-server/src/mutation.rs(+343 -13)...and 19 more files
📄 Description
Summary
Implements comprehensive user account disable/enable functionality with automatic session invalidation to allow administrators to
prevent users from logging in and immediately revoke existing sessions without deleting their accounts.
Closes #750
Changes
Backend (Server)
login_enabledboolean field toUserdomain model and database schemalogin_enabledcolumn with safe defaults (true)loginEnabledfield inUsertype andUpdateUserInputlogin_enabledfield support to LDAP protocol attribute mappinglldap_password_managergroup members to disable/enable user accountsFrontend (App)
loginEnabledfieldSession Management
SessionAwareBackendHandlerwrapper automatically invalidates all user sessions whenlogin_enabledisset to false
Features
LDAP Usage
Query disabled users:
Filter out disabled users:
Security Features
Testing
Breaking Changes
None - this is a backward compatible feature addition.
Database Migration
login_enabledcolumn with DEFAULT trueImplementation Details
Session Invalidation Architecture
update_usercalls and detects whenlogin_enabledchanges to falseblacklist_jwts()to mark user's JWT tokens as invalid in databaseAdmin Protection Logic
lldap_adminorlldap_password_managergroupsScreenshots
User Table with Status Column
Disabled user trying to log in
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.