debian-mirror-gitlab/spec/frontend/invite_members/mock_data/api_responses.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.3 KiB
JavaScript
Raw Normal View History

2022-06-21 17:19:12 +05:30
const EMAIL_INVALID = {
2021-09-30 23:02:18 +05:30
message: { error: 'email contains an invalid email address' },
};
2022-06-21 17:19:12 +05:30
const ERROR_EMAIL_INVALID = {
2021-09-30 23:02:18 +05:30
error: 'email contains an invalid email address',
};
2022-06-21 17:19:12 +05:30
const EMAIL_RESTRICTED = {
2021-09-30 23:02:18 +05:30
message: {
'email@example.com':
2021-11-18 22:05:49 +05:30
"The member's email address is not allowed for this project. Go to the Admin area > Sign-up restrictions, and check Allowed domains for sign-ups.",
2021-09-30 23:02:18 +05:30
},
status: 'error',
};
2022-06-21 17:19:12 +05:30
const MULTIPLE_RESTRICTED = {
2021-09-30 23:02:18 +05:30
message: {
'email@example.com':
2021-11-18 22:05:49 +05:30
"The member's email address is not allowed for this project. Go to the Admin area > Sign-up restrictions, and check Allowed domains for sign-ups.",
2021-09-30 23:02:18 +05:30
'email4@example.com':
2021-11-18 22:05:49 +05:30
"The member's email address is not allowed for this project. Go to the Admin area > Sign-up restrictions, and check the Domain denylist.",
2022-06-21 17:19:12 +05:30
root:
2021-11-18 22:05:49 +05:30
"The member's email address is not allowed for this project. Go to the Admin area > Sign-up restrictions, and check Allowed domains for sign-ups.",
},
2022-06-21 17:19:12 +05:30
status: 'error',
2021-09-30 23:02:18 +05:30
};
2022-06-21 17:19:12 +05:30
const EMAIL_TAKEN = {
2021-09-30 23:02:18 +05:30
message: {
2022-06-21 17:19:12 +05:30
'email@example.org': "The member's email address has already been taken",
2021-09-30 23:02:18 +05:30
},
status: 'error',
};
2022-06-21 17:19:12 +05:30
export const GROUPS_INVITATIONS_PATH = '/api/v4/groups/1/invitations';
2021-09-30 23:02:18 +05:30
export const invitationsApiResponse = {
2022-06-21 17:19:12 +05:30
EMAIL_INVALID,
ERROR_EMAIL_INVALID,
EMAIL_RESTRICTED,
MULTIPLE_RESTRICTED,
EMAIL_TAKEN,
2021-09-30 23:02:18 +05:30
};