mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-04 07:10:18 +01:00
🔐 feat: Granular Role-based Permissions + Entra ID Group Discovery (#7804)
WIP: pre-granular-permissions commit
feat: Add category and support contact fields to Agent schema and UI components
Revert "feat: Add category and support contact fields to Agent schema and UI components"
This reverts commit c43a52b4c9.
Fix: Update import for renderHook in useAgentCategories.spec.tsx
fix: Update icon rendering in AgentCategoryDisplay tests to use empty spans
refactor: Improve category synchronization logic and clean up AgentConfig component
refactor: Remove unused UI flow translations from translation.json
feat: agent marketplace features
🔐 feat: Granular Role-based Permissions + Entra ID Group Discovery (#7804)
This commit is contained in:
parent
aa42759ffd
commit
66bd419baa
147 changed files with 17564 additions and 645 deletions
56
packages/data-schemas/src/schema/group.ts
Normal file
56
packages/data-schemas/src/schema/group.ts
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
import { Schema } from 'mongoose';
|
||||
import type { IGroup } from '~/types';
|
||||
|
||||
const groupSchema = new Schema<IGroup>(
|
||||
{
|
||||
name: {
|
||||
type: String,
|
||||
required: true,
|
||||
index: true,
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
email: {
|
||||
type: String,
|
||||
required: false,
|
||||
index: true,
|
||||
},
|
||||
avatar: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
memberIds: [
|
||||
{
|
||||
type: String,
|
||||
},
|
||||
],
|
||||
source: {
|
||||
type: String,
|
||||
enum: ['local', 'entra'],
|
||||
default: 'local',
|
||||
},
|
||||
/** External ID (e.g., Entra ID) */
|
||||
idOnTheSource: {
|
||||
type: String,
|
||||
sparse: true,
|
||||
index: true,
|
||||
required: function (this: IGroup) {
|
||||
return this.source !== 'local';
|
||||
},
|
||||
},
|
||||
},
|
||||
{ timestamps: true },
|
||||
);
|
||||
|
||||
groupSchema.index(
|
||||
{ idOnTheSource: 1, source: 1 },
|
||||
{
|
||||
unique: true,
|
||||
partialFilterExpression: { idOnTheSource: { $exists: true } },
|
||||
},
|
||||
);
|
||||
groupSchema.index({ memberIds: 1 });
|
||||
|
||||
export default groupSchema;
|
||||
Loading…
Add table
Add a link
Reference in a new issue