fix: update project disabled messages for clarity and consistency
This commit is contained in:
@@ -52,7 +52,15 @@ export class Domains {
|
||||
const isDisabled = await SecurityService.isProjectDisabled(projectId);
|
||||
if (isDisabled) {
|
||||
throw new NotAllowed(
|
||||
'Cannot add domains to a disabled project. Please contact support to resolve security violations before making changes.',
|
||||
'This project has been disabled. Please contact support for assistance.',
|
||||
);
|
||||
}
|
||||
|
||||
// Block subdomains whose root domain belongs to a disabled project
|
||||
const rootCheck = await DomainService.checkSubdomainOfDisabledRoot(domain);
|
||||
if (rootCheck.blocked) {
|
||||
throw new NotAllowed(
|
||||
'This domain cannot be added at this time. Please contact support for assistance.',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -138,7 +146,7 @@ export class Domains {
|
||||
const isDisabled = await SecurityService.isProjectDisabled(domain.projectId);
|
||||
if (isDisabled) {
|
||||
throw new NotAllowed(
|
||||
'Cannot remove domains from a disabled project. Please contact support to resolve security violations before making changes.',
|
||||
'This project has been disabled. Please contact support for assistance.',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ export class Users {
|
||||
if (hasDisabledProject) {
|
||||
throw new HttpException(
|
||||
403,
|
||||
`You cannot create new projects while you are a member of disabled projects: ${disabledProjectNames.join(', ')}. Please contact support to resolve security violations.`,
|
||||
`You cannot create new projects at this time. Please contact support for assistance.`,
|
||||
ErrorCode.PROJECT_DISABLED,
|
||||
);
|
||||
}
|
||||
@@ -615,7 +615,7 @@ export class Users {
|
||||
if (isDisabled) {
|
||||
throw new HttpException(
|
||||
403,
|
||||
'Cannot reset a disabled project. Please contact support to resolve security violations before making changes.',
|
||||
'This project has been disabled. Please contact support for assistance.',
|
||||
ErrorCode.PROJECT_DISABLED,
|
||||
);
|
||||
}
|
||||
@@ -703,7 +703,7 @@ export class Users {
|
||||
if (project.disabled) {
|
||||
throw new HttpException(
|
||||
403,
|
||||
'Cannot delete a disabled project. Please contact support to resolve security violations.',
|
||||
'This project has been disabled. Please contact support for assistance.',
|
||||
ErrorCode.PROJECT_DISABLED,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user