Skip to content

Commit ea105d1

Browse files
authored
refactor: refactor policy definition and generation code (#1468)
1 parent aade41d commit ea105d1

25 files changed

+1161
-977
lines changed

packages/runtime/src/constants.ts

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -63,41 +63,6 @@ export const PRISMA_PROXY_ENHANCER = '$__zenstack_enhancer';
6363
*/
6464
export const PRISMA_MINIMUM_VERSION = '5.0.0';
6565

66-
/**
67-
* Selector function name for fetching pre-update entity values.
68-
*/
69-
export const PRE_UPDATE_VALUE_SELECTOR = 'preValueSelect';
70-
71-
/**
72-
* Prefix for field-level read checker function name
73-
*/
74-
export const FIELD_LEVEL_READ_CHECKER_PREFIX = 'readFieldCheck$';
75-
76-
/**
77-
* Field-level access control evaluation selector function name
78-
*/
79-
export const FIELD_LEVEL_READ_CHECKER_SELECTOR = 'readFieldSelect';
80-
81-
/**
82-
* Prefix for field-level override read guard function name
83-
*/
84-
export const FIELD_LEVEL_OVERRIDE_READ_GUARD_PREFIX = 'readFieldGuardOverride$';
85-
86-
/**
87-
* Prefix for field-level update guard function name
88-
*/
89-
export const FIELD_LEVEL_UPDATE_GUARD_PREFIX = 'updateFieldGuard$';
90-
91-
/**
92-
* Prefix for field-level override update guard function name
93-
*/
94-
export const FIELD_LEVEL_OVERRIDE_UPDATE_GUARD_PREFIX = 'updateFieldGuardOverride$';
95-
96-
/**
97-
* Flag that indicates if the model has field-level access control
98-
*/
99-
export const HAS_FIELD_LEVEL_POLICY_FLAG = 'hasFieldLevelPolicy';
100-
10166
/**
10267
* Prefix for auxiliary relation field generated for delegated models
10368
*/

0 commit comments

Comments
 (0)