Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: refactor policy definition and generation code #1468

Merged
merged 2 commits into from
May 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions packages/runtime/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,41 +63,6 @@ export const PRISMA_PROXY_ENHANCER = '$__zenstack_enhancer';
*/
export const PRISMA_MINIMUM_VERSION = '5.0.0';

/**
* Selector function name for fetching pre-update entity values.
*/
export const PRE_UPDATE_VALUE_SELECTOR = 'preValueSelect';

/**
* Prefix for field-level read checker function name
*/
export const FIELD_LEVEL_READ_CHECKER_PREFIX = 'readFieldCheck$';

/**
* Field-level access control evaluation selector function name
*/
export const FIELD_LEVEL_READ_CHECKER_SELECTOR = 'readFieldSelect';

/**
* Prefix for field-level override read guard function name
*/
export const FIELD_LEVEL_OVERRIDE_READ_GUARD_PREFIX = 'readFieldGuardOverride$';

/**
* Prefix for field-level update guard function name
*/
export const FIELD_LEVEL_UPDATE_GUARD_PREFIX = 'updateFieldGuard$';

/**
* Prefix for field-level override update guard function name
*/
export const FIELD_LEVEL_OVERRIDE_UPDATE_GUARD_PREFIX = 'updateFieldGuardOverride$';

/**
* Flag that indicates if the model has field-level access control
*/
export const HAS_FIELD_LEVEL_POLICY_FLAG = 'hasFieldLevelPolicy';

/**
* Prefix for auxiliary relation field generated for delegated models
*/
Expand Down
Loading
Loading