[permissions] Add permission gates on workspaceMember (#10447)
- Adding permission gates on workspaceMember to only allow user with admin permissions OR users attempting to update or delete themself to perform write operations on workspaceMember object - Reverting some changes to treat workflow objects as regular metadata objects (any user can interact with them) - (fix) Block updates on soft deleted records
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
export * from './fieldMetadata';
|
||||
export * from './image';
|
||||
export * from './permissions';
|
||||
export * from './strings';
|
||||
export * from './validation';
|
||||
|
||||
@ -1 +0,0 @@
|
||||
export * from './isObjectRecordUnderObjectRecordsPermissions';
|
||||
@ -1,16 +0,0 @@
|
||||
import { STANDARD_OBJECT_RECORDS_UNDER_OBJECT_RECORDS_PERMISSIONS } from 'src/constants';
|
||||
|
||||
export const isObjectRecordUnderObjectRecordsPermissions = ({
|
||||
isCustom,
|
||||
nameSingular,
|
||||
}: {
|
||||
isCustom: boolean;
|
||||
nameSingular: string;
|
||||
}) => {
|
||||
return (
|
||||
isCustom ||
|
||||
STANDARD_OBJECT_RECORDS_UNDER_OBJECT_RECORDS_PERMISSIONS.includes(
|
||||
nameSingular,
|
||||
)
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user