mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-27 04:07:05 +00:00
test: Allow manual skill sync status tenant scoping
This commit is contained in:
parent
95133f42cd
commit
422c1299e7
1 changed files with 5 additions and 3 deletions
|
|
@ -11,10 +11,12 @@ const TENANT_ISOLATION_APPLIED = Symbol.for('librechat:tenantIsolation');
|
|||
/**
|
||||
* Models that carry a `tenantId` field but intentionally do NOT use the
|
||||
* tenant-isolation plugin. SystemGrant scopes tenancy manually inside its
|
||||
* methods (see models/systemGrant). Adding an entry here must be a deliberate,
|
||||
* reviewed decision — that is the whole point of this guard.
|
||||
* methods (see models/systemGrant). SkillSyncStatus stores both app-wide YAML
|
||||
* status rows and tenant-scoped override rows, so its methods apply explicit
|
||||
* tenant filters instead of ambient ALS scoping. Adding an entry here must be a
|
||||
* deliberate, reviewed decision — that is the whole point of this guard.
|
||||
*/
|
||||
const MANUAL_TENANT_SCOPING = new Set<string>(['SystemGrant']);
|
||||
const MANUAL_TENANT_SCOPING = new Set<string>(['SystemGrant', 'SkillSyncStatus']);
|
||||
|
||||
function isPluginApplied(schema: mongoose.Schema): boolean {
|
||||
return (schema as unknown as { [key: symbol]: boolean })[TENANT_ISOLATION_APPLIED] === true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue