mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-04 02:04:06 +00:00
feat(ui): import Prowler OCSF findings from the Scans page (#12554)
Co-authored-by: alejandrobailo <alejandrobailo94@gmail.com>
This commit is contained in:
co-authored by
alejandrobailo
parent
1679094f22
commit
0715619435
@@ -132,6 +132,29 @@ describe("auth actions", () => {
|
||||
expect(requestUrl.searchParams.get("utm_source")).toBe("blackhat");
|
||||
});
|
||||
|
||||
it("should carry manage_ingestions into the session permissions", async () => {
|
||||
// Given
|
||||
mockUserMe({ manage_ingestions: true });
|
||||
|
||||
// When
|
||||
const result = await getUserByMe("access-token");
|
||||
|
||||
// Then
|
||||
expect(result.permissions.manage_ingestions).toBe(true);
|
||||
});
|
||||
|
||||
it("should default manage_ingestions to false when the role omits it", async () => {
|
||||
// Given
|
||||
mockUserMe({ manage_scans: true });
|
||||
|
||||
// When
|
||||
const result = await getUserByMe("access-token");
|
||||
|
||||
// Then
|
||||
expect(result.permissions.manage_ingestions).toBe(false);
|
||||
expect(result.permissions.manage_scans).toBe(true);
|
||||
});
|
||||
|
||||
it("should carry manage_lighthouse_ai_configuration into the session permissions", async () => {
|
||||
// Given
|
||||
mockUserMe({ manage_lighthouse_ai_configuration: true });
|
||||
|
||||
@@ -180,6 +180,7 @@ export const getUserByMe = async (
|
||||
manage_account: userRole.attributes.manage_account || false,
|
||||
manage_providers: userRole.attributes.manage_providers || false,
|
||||
manage_scans: userRole.attributes.manage_scans || false,
|
||||
manage_ingestions: userRole.attributes.manage_ingestions || false,
|
||||
manage_integrations: userRole.attributes.manage_integrations || false,
|
||||
manage_billing: userRole.attributes.manage_billing || false,
|
||||
manage_alerts: userRole.attributes.manage_alerts || false,
|
||||
|
||||
Reference in New Issue
Block a user