[permissions] Deprecate ObjectsPermissionsDeprecated (2/3) (#14450)
Following https://github.com/twentyhq/twenty/pull/14306 , working on the deprecation of objectRecordsPermissions + renaming of objectPermissions -> objectsPermissions In this PR - Removal of objectRecordsPermissions (was not used in the FE any longer) - Addition of objectsPermissions, same as objectPermission but renamed. objectPermission is no longer used in the FE. Next step - Remove unused objectPermissions
This commit is contained in:
@@ -118,9 +118,9 @@ export const UserProviderEffect = () => {
|
||||
if (isDefined(queryData.currentUser.currentUserWorkspace)) {
|
||||
setCurrentUserWorkspace({
|
||||
...queryData.currentUser.currentUserWorkspace,
|
||||
objectPermissions:
|
||||
objectsPermissions:
|
||||
(queryData.currentUser.currentUserWorkspace
|
||||
.objectPermissions as Array<
|
||||
.objectsPermissions as Array<
|
||||
ObjectPermissions & { objectMetadataId: string }
|
||||
>) ?? [],
|
||||
});
|
||||
|
||||
@@ -32,8 +32,7 @@ export const USER_QUERY_FRAGMENT = gql`
|
||||
}
|
||||
currentUserWorkspace {
|
||||
permissionFlags
|
||||
objectRecordsPermissions
|
||||
objectPermissions {
|
||||
objectsPermissions {
|
||||
...ObjectPermissionFragment
|
||||
}
|
||||
twoFactorAuthenticationMethodSummary {
|
||||
|
||||
@@ -75,8 +75,8 @@ export const useLoadCurrentUser = () => {
|
||||
if (isDefined(user.currentUserWorkspace)) {
|
||||
setCurrentUserWorkspace({
|
||||
...user.currentUserWorkspace,
|
||||
objectPermissions:
|
||||
(user.currentUserWorkspace.objectPermissions as Array<
|
||||
objectsPermissions:
|
||||
(user.currentUserWorkspace.objectsPermissions as Array<
|
||||
ObjectPermissions & { objectMetadataId: string }
|
||||
>) ?? [],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user