[PR #617] [MERGED] Add a graphql method to get the schema #853

Closed
opened 2026-02-27 09:09:58 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/lldap/lldap/pull/617
Author: @nitnelave
Created: 7/4/2023
Status: Merged
Merged: 7/10/2023
Merged by: @nitnelave

Base: mainHead: schema


📝 Commits (2)

  • 765b8f9 server,ldap: add encoding for lists and integers
  • 3222c38 server,graphql: Add a GraphQL method to get the schema

📊 Changes

9 files changed (+608 additions, -160 deletions)

View changed files

📝 schema.graphql (+19 -0)
📝 server/src/domain/handler.rs (+0 -43)
📝 server/src/domain/ldap/utils.rs (+38 -9)
📝 server/src/infra/access_control.rs (+13 -8)
📝 server/src/infra/graphql/query.rs (+328 -2)
📝 server/src/infra/ldap_handler.rs (+2 -98)
📝 server/src/infra/mod.rs (+4 -0)
server/src/infra/schema.rs (+104 -0)
server/src/infra/test_utils.rs (+100 -0)

📄 Description

I chose to decouple the domain-level configurable attributes, and the public-viewable schema which includes the attributes that are not stored as "user attributes". All the "hardcoded" attributes will be available as fields from grahpql, and the non-hardcoded will be only in the "user_attributes" (coming) field.

In terms of permissions, only users who have the permissions to see all the users (admin, password manager or readonly) can see the schema. Regular users cannot (they wouldn't have much use for it, and that way I don't have to filter the fields they're not allowed to see).


🔄 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/lldap/lldap/pull/617 **Author:** [@nitnelave](https://github.com/nitnelave) **Created:** 7/4/2023 **Status:** ✅ Merged **Merged:** 7/10/2023 **Merged by:** [@nitnelave](https://github.com/nitnelave) **Base:** `main` ← **Head:** `schema` --- ### 📝 Commits (2) - [`765b8f9`](https://github.com/lldap/lldap/commit/765b8f9c46bfc870552e4af59db044eaa33174f5) server,ldap: add encoding for lists and integers - [`3222c38`](https://github.com/lldap/lldap/commit/3222c38c1ad90fa92227ae9ad75df0902e3a3275) server,graphql: Add a GraphQL method to get the schema ### 📊 Changes **9 files changed** (+608 additions, -160 deletions) <details> <summary>View changed files</summary> 📝 `schema.graphql` (+19 -0) 📝 `server/src/domain/handler.rs` (+0 -43) 📝 `server/src/domain/ldap/utils.rs` (+38 -9) 📝 `server/src/infra/access_control.rs` (+13 -8) 📝 `server/src/infra/graphql/query.rs` (+328 -2) 📝 `server/src/infra/ldap_handler.rs` (+2 -98) 📝 `server/src/infra/mod.rs` (+4 -0) ➕ `server/src/infra/schema.rs` (+104 -0) ➕ `server/src/infra/test_utils.rs` (+100 -0) </details> ### 📄 Description I chose to decouple the domain-level configurable attributes, and the public-viewable schema which includes the attributes that are not stored as "user attributes". All the "hardcoded" attributes will be available as fields from grahpql, and the non-hardcoded will be only in the "user_attributes" (coming) field. In terms of permissions, only users who have the permissions to see all the users (admin, password manager or readonly) can see the schema. Regular users cannot (they wouldn't have much use for it, and that way I don't have to filter the fields they're not allowed to see). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 09:09:58 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#853
No description provided.