This commit is contained in:
Rudhra Deep Biswas 2025-04-17 12:15:08 +05:30 committed by GitHub
parent b73437991d
commit 8e6326f6c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 3 deletions

View file

@ -192,8 +192,21 @@ export const returnWorkspaceIdIfNeed = (path) => {
};
export const getRedirectURL = (path) => {
let redirectLoc = '/';
const instanceLevelRoutes = [
'/all-users',
'/all-workspaces',
'/manage-instance-settings',
'/white-labelling',
'/instance-login',
'/smtp',
'/license',
];
if (path) {
redirectLoc = `${returnWorkspaceIdIfNeed(path)}${path !== '/' ? path : ''}`;
if (instanceLevelRoutes.includes(path)) {
redirectLoc = `/settings${path}`;
} else {
redirectLoc = `${returnWorkspaceIdIfNeed(path)}${path !== '/' ? path : ''}`;
}
} else {
const redirectTo = getRedirectTo();
const { from } = redirectTo ? { from: { pathname: redirectTo } } : { from: { pathname: '/' } };

View file

@ -27,8 +27,10 @@ export class LicenseOrganizationService implements ILicenseOrganizationService {
}
async limit(manager?: EntityManager): Promise<void> {
const licenseTerms = await this.licenseTermsService.getLicenseTerms(LICENSE_FIELD.WORKSPACES);
const licenseTerms = await this.licenseTermsService.getLicenseTerms([
LICENSE_FIELD.WORKSPACES,
LICENSE_FIELD.STATUS,
]);
return await dbTransactionWrap(async (manager: EntityManager) => {
return {
workspacesCount: generatePayloadForLimits(