2021-09-30 23:02:18 +05:30
const INVITATIONS _API _EMAIL _INVALID = {
message : { error : 'email contains an invalid email address' } ,
} ;
const INVITATIONS _API _ERROR _EMAIL _INVALID = {
error : 'email contains an invalid email address' ,
} ;
const INVITATIONS _API _EMAIL _RESTRICTED = {
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' ,
} ;
const INVITATIONS _API _MULTIPLE _EMAIL _RESTRICTED = {
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." ,
2021-09-30 23:02:18 +05:30
} ,
status : 'error' ,
} ;
const INVITATIONS _API _EMAIL _TAKEN = {
message : {
2022-03-02 08:16:31 +05:30
'email@example.org' : 'Invite email has already been taken' ,
2021-09-30 23:02:18 +05:30
} ,
status : 'error' ,
} ;
const MEMBERS _API _MEMBER _ALREADY _EXISTS = {
message : 'Member already exists' ,
} ;
const MEMBERS _API _SINGLE _USER _RESTRICTED = {
2021-11-18 22:05:49 +05:30
message : {
user : [
"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
} ;
const MEMBERS _API _SINGLE _USER _ACCESS _LEVEL = {
message : {
access _level : [
'should be greater than or equal to Owner inherited membership from group Gitlab Org' ,
] ,
} ,
} ;
const MEMBERS _API _MULTIPLE _USERS _RESTRICTED = {
message :
2021-11-18 22:05:49 +05:30
"root: 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. and user18: The member's email address is not allowed for this project. Go to the Admin area > Sign-up restrictions, and check the Domain denylist. and john_doe31: The member's email address is not allowed for this project. Go to the Admin area > Sign-up restrictions, and check Email restrictions for sign-ups." ,
2021-09-30 23:02:18 +05:30
status : 'error' ,
} ;
export const apiPaths = {
GROUPS _MEMBERS : '/api/v4/groups/1/members' ,
GROUPS _INVITATIONS : '/api/v4/groups/1/invitations' ,
} ;
export const membersApiResponse = {
MEMBER _ALREADY _EXISTS : MEMBERS _API _MEMBER _ALREADY _EXISTS ,
SINGLE _USER _ACCESS _LEVEL : MEMBERS _API _SINGLE _USER _ACCESS _LEVEL ,
SINGLE _USER _RESTRICTED : MEMBERS _API _SINGLE _USER _RESTRICTED ,
MULTIPLE _USERS _RESTRICTED : MEMBERS _API _MULTIPLE _USERS _RESTRICTED ,
} ;
export const invitationsApiResponse = {
EMAIL _INVALID : INVITATIONS _API _EMAIL _INVALID ,
ERROR _EMAIL _INVALID : INVITATIONS _API _ERROR _EMAIL _INVALID ,
EMAIL _RESTRICTED : INVITATIONS _API _EMAIL _RESTRICTED ,
MULTIPLE _EMAIL _RESTRICTED : INVITATIONS _API _MULTIPLE _EMAIL _RESTRICTED ,
EMAIL _TAKEN : INVITATIONS _API _EMAIL _TAKEN ,
} ;