forked from Shared/esg
parsian inquiries implemented
This commit is contained in:
@@ -35,10 +35,11 @@ export class InquiryAccessGuard implements CanActivate {
|
||||
return true;
|
||||
}
|
||||
|
||||
const inquiryKey = requiredInquiry as string;
|
||||
if (!user.allowedInquiries.includes(inquiryKey)) {
|
||||
throw new ForbiddenException(`Access denied for inquiry: ${inquiryKey}`);
|
||||
}
|
||||
// Temporarily disabled: allow every authenticated user/client to call every inquiry.
|
||||
// const inquiryKey = requiredInquiry as string;
|
||||
// if (!user.allowedInquiries.includes(inquiryKey)) {
|
||||
// throw new ForbiddenException(`Access denied for inquiry: ${inquiryKey}`);
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user