Refactor rls backend simplify add tests (#17357)
## Context Removing full CRUD to RLS since we are actually using an upsert only over the role resolver, this removes a lot of unused code (could be re-added later but unlikely). Simplified the folder arch at the same time Add simple integration tests to RLS
This commit is contained in:
+4
@@ -15,7 +15,9 @@ export const RowLevelPermissionPredicateGroupExceptionCode =
|
||||
INVALID_ROW_LEVEL_PERMISSION_PREDICATE_GROUP_DATA:
|
||||
'INVALID_ROW_LEVEL_PERMISSION_PREDICATE_GROUP_DATA',
|
||||
ROLE_NOT_FOUND: 'ROLE_NOT_FOUND',
|
||||
OBJECT_METADATA_NOT_FOUND: 'OBJECT_METADATA_NOT_FOUND',
|
||||
UNAUTHORIZED_ROLE_MODIFICATION: 'UNAUTHORIZED_ROLE_MODIFICATION',
|
||||
UNAUTHORIZED_OBJECT_MODIFICATION: 'UNAUTHORIZED_OBJECT_MODIFICATION',
|
||||
ROW_LEVEL_PERMISSION_FEATURE_DISABLED:
|
||||
'ROW_LEVEL_PERMISSION_FEATURE_DISABLED',
|
||||
} as const);
|
||||
@@ -27,7 +29,9 @@ const rowLevelPermissionPredicateGroupExceptionUserFriendlyMessages: Record<
|
||||
ROW_LEVEL_PERMISSION_PREDICATE_GROUP_NOT_FOUND: msg`Row level permission predicate group not found.`,
|
||||
INVALID_ROW_LEVEL_PERMISSION_PREDICATE_GROUP_DATA: msg`Invalid row level permission predicate group data.`,
|
||||
ROLE_NOT_FOUND: msg`Role not found.`,
|
||||
OBJECT_METADATA_NOT_FOUND: msg`Object metadata not found.`,
|
||||
UNAUTHORIZED_ROLE_MODIFICATION: msg`Cannot modify predicate group belonging to a different role.`,
|
||||
UNAUTHORIZED_OBJECT_MODIFICATION: msg`Cannot modify predicate group belonging to a different object.`,
|
||||
ROW_LEVEL_PERMISSION_FEATURE_DISABLED: msg`Row level permission predicate feature is disabled.`,
|
||||
INTERNAL_SERVER_ERROR: msg`An unexpected error occurred.`,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user