[permissions - seeds] Give tim@apple.dev restricted rights (#12768)
Let's introduce an object-limited role for Tim, to test and/or spot incompatibilities with restricted permissions in the future. Our main user tim@apple.dev is now assigned a role that has all settings permissions, and all object permissions except for update on Pets (to test read-only view) and read on Rockets. Since we still need an admin user for each workspace we are introducing a new member, Jane, who has the admin role --------- Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
@ -1,14 +1,14 @@
|
||||
import { TEST_COMPANY_1_ID } from 'test/integration/constants/test-company-ids.constants';
|
||||
import {
|
||||
TEST_PERSON_1_ID,
|
||||
TEST_PERSON_2_ID,
|
||||
} from 'test/integration/constants/test-person-ids.constants';
|
||||
import { TEST_PRIMARY_LINK_URL } from 'test/integration/constants/test-primary-link-url.constant';
|
||||
import { makeRestAPIRequest } from 'test/integration/rest/utils/make-rest-api-request.util';
|
||||
import { deleteAllRecords } from 'test/integration/utils/delete-all-records';
|
||||
import { TEST_COMPANY_1_ID } from 'test/integration/constants/test-company-ids.constants';
|
||||
import { TEST_PRIMARY_LINK_URL } from 'test/integration/constants/test-primary-link-url.constant';
|
||||
import { TIM_ACCOUNT_ID } from 'test/integration/graphql/integration.constants';
|
||||
|
||||
import { FieldActorSource } from 'src/engine/metadata-modules/field-metadata/composite-types/actor.composite-type';
|
||||
import { WORKSPACE_MEMBER_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/workspace-member-data-seeds.constant';
|
||||
|
||||
describe('Core REST API Create Many endpoint', () => {
|
||||
beforeEach(async () => {
|
||||
@ -112,12 +112,12 @@ describe('Core REST API Create Many endpoint', () => {
|
||||
|
||||
expect(createdPeople[0].createdBy.source).toBe(FieldActorSource.MANUAL);
|
||||
expect(createdPeople[0].createdBy.workspaceMemberId).toBe(
|
||||
TIM_ACCOUNT_ID,
|
||||
WORKSPACE_MEMBER_DATA_SEED_IDS.JANE,
|
||||
);
|
||||
|
||||
expect(createdPeople[1].createdBy.source).toBe(FieldActorSource.MANUAL);
|
||||
expect(createdPeople[1].createdBy.workspaceMemberId).toBe(
|
||||
TIM_ACCOUNT_ID,
|
||||
WORKSPACE_MEMBER_DATA_SEED_IDS.JANE,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -4,12 +4,12 @@ import {
|
||||
TEST_PRIMARY_LINK_URL,
|
||||
TEST_PRIMARY_LINK_URL_WIITHOUT_TRAILING_SLASH,
|
||||
} from 'test/integration/constants/test-primary-link-url.constant';
|
||||
import { TIM_ACCOUNT_ID } from 'test/integration/graphql/integration.constants';
|
||||
import { makeRestAPIRequest } from 'test/integration/rest/utils/make-rest-api-request.util';
|
||||
import { deleteAllRecords } from 'test/integration/utils/delete-all-records';
|
||||
import { generateRecordName } from 'test/integration/utils/generate-record-name';
|
||||
|
||||
import { FieldActorSource } from 'src/engine/metadata-modules/field-metadata/composite-types/actor.composite-type';
|
||||
import { WORKSPACE_MEMBER_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/workspace-member-data-seeds.constant';
|
||||
|
||||
describe('Core REST API Create One endpoint', () => {
|
||||
beforeEach(async () => {
|
||||
@ -94,7 +94,9 @@ describe('Core REST API Create One endpoint', () => {
|
||||
const createdPerson = res.body.data.createPerson;
|
||||
|
||||
expect(createdPerson.createdBy.source).toBe(FieldActorSource.MANUAL);
|
||||
expect(createdPerson.createdBy.workspaceMemberId).toBe(TIM_ACCOUNT_ID);
|
||||
expect(createdPerson.createdBy.workspaceMemberId).toBe(
|
||||
WORKSPACE_MEMBER_DATA_SEED_IDS.JANE,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user