@@ -11,6 +11,7 @@ export type PortalNavAccess = {
|
||||
authenticated: boolean;
|
||||
manager: boolean;
|
||||
businesses?: boolean;
|
||||
businessReviewUrl?: string | null;
|
||||
education?: boolean;
|
||||
ai?: boolean;
|
||||
legacyContent?: boolean;
|
||||
@@ -133,6 +134,9 @@ export function portalNavigation(access: PortalNavAccess): PortalNavItem[] {
|
||||
),
|
||||
]
|
||||
: []),
|
||||
...(access.authenticated && access.businesses && access.businessReviewUrl
|
||||
? [link('review-businesses', 'Revisão de negócios', access.businessReviewUrl)]
|
||||
: []),
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@ export class ProfileValidationError extends Error {
|
||||
constructor(
|
||||
message: string,
|
||||
public readonly fields: Record<string, string>,
|
||||
public readonly reauthenticate = false,
|
||||
) {
|
||||
super(message);
|
||||
}
|
||||
@@ -33,6 +34,7 @@ export async function profileJson(
|
||||
Array.isArray(value) ? value.join(' ') : String(value),
|
||||
]),
|
||||
),
|
||||
response.headers.get('X-Portal-Reauthentication') === 'required',
|
||||
);
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user