Skip to content

Commit

Permalink
Merge pull request #772 from rbt-mm/master-global-audit-view-policy-v…
Browse files Browse the repository at this point in the history
…iolations

Global Audit View: Policy Violations
  • Loading branch information
nscuro authored Sep 24, 2024
2 parents a857417 + 44072ba commit 8d7cc7d
Show file tree
Hide file tree
Showing 17 changed files with 547 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/containers/DefaultContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,23 @@ export default {
element: '',
attributes: {},
},
permission: permissions.VIEW_VULNERABILITY,
permissions: [
permissions.VIEW_VULNERABILITY,
permissions.VIEW_POLICY_VIOLATION,
],
},
{
name: this.$t('message.vulnerability_audit'),
url: '/vulnerabilityAudit',
icon: 'fa fa-tasks',
permission: permissions.VIEW_VULNERABILITY,
},
{
name: this.$t('message.policy_violation_audit'),
url: '/policyViolationAudit',
icon: 'fa fa-fire',
permission: permissions.VIEW_POLICY_VIOLATION,
},
{
title: true,
name: this.$t('message.administration'),
Expand Down Expand Up @@ -233,8 +242,12 @@ export default {
let array = [];
for (const item of this.nav) {
if (
item.permission !== null &&
permissions.hasPermission(item.permission, decodedToken)
(item.permission !== null &&
permissions.hasPermission(item.permission, decodedToken)) ||
(Object.prototype.hasOwnProperty.call(item, 'permissions') &&
item.permissions.some((permission) =>
permissions.hasPermission(permission, decodedToken),
))
) {
array.push(item);
}
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@
"policy_deleted": "Richtlinie gelöscht",
"policy_management": "Richtlinienverwaltung",
"policy_name": "Versicherungsname",
"policy_violation_audit": "Richtlinienverstoß-Audit",
"policy_violations": "Richtlinienverstöße",
"policy_violations_by_classification": "Richtlinienverletzungen nach Klassifizierung",
"policy_violations_by_state": "Richtlinienverstöße nach Status",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@
"policy_deleted": "Policy deleted",
"policy_management": "Policy Management",
"policy_name": "Policy Name",
"policy_violation_audit": "Policy Violation Audit",
"policy_violations": "Policy Violations",
"policy_violations_by_classification": "Policy Violations by Classification",
"policy_violations_by_state": "Policy Violations by State",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@
"policy_deleted": "Política eliminada",
"policy_management": "Gestión de políticas",
"policy_name": "Nombre de directiva",
"policy_violation_audit": "Auditoría de violaciones de políticas",
"policy_violations": "Violaciones de políticas",
"policy_violations_by_classification": "Violaciones de políticas por clasificación",
"policy_violations_by_state": "Violaciones de políticas por estado",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@
"policy_deleted": "Politique supprimée",
"policy_management": "Gestion des politiques",
"policy_name": "Nom de la politique",
"policy_violation_audit": "Audit des violations des politiques",
"policy_violations": "Violations de politiques",
"policy_violations_by_classification": "Violations de politiques par classification",
"policy_violations_by_state": "Violations de politiques par État",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@
"policy_deleted": "नीति हटा दी गई",
"policy_management": "नीति प्रबंधन",
"policy_name": "पालिसी का नाम",
"policy_violation_audit": "नीति उल्लंघन ऑडिट",
"policy_violations": "नीति उल्लंघन",
"policy_violations_by_classification": "वर्गीकरण के अनुसार नीति उल्लंघन",
"policy_violations_by_state": "राज्यवार नीति उल्लंघन",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@
"policy_deleted": "Politica eliminata",
"policy_management": "Gestione delle politiche",
"policy_name": "Nome della politica",
"policy_violation_audit": "Controllo della violazione delle policy",
"policy_violations": "Violazioni delle norme",
"policy_violations_by_classification": "Violazioni delle policy per classificazione",
"policy_violations_by_state": "Violazioni delle politiche da parte dello Stato",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@
"policy_deleted": "ポリシーを削除しました",
"policy_management": "ポリシー管理",
"policy_name": "ポリシー名",
"policy_violation_audit": "ポリシー違反の監査",
"policy_violations": "ポリシー違反",
"policy_violations_by_classification": "分類別のポリシー違反",
"policy_violations_by_state": "州別のポリシー違反",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@
"policy_deleted": "Polityka została usunięta",
"policy_management": "Zarządzanie polityką",
"policy_name": "Nazwa zasady",
"policy_violation_audit": "Audyt naruszeń zasad",
"policy_violations": "Naruszenia zasad",
"policy_violations_by_classification": "Naruszenia zasad według klasyfikacji",
"policy_violations_by_state": "Naruszenia zasad według stanu",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@
"policy_deleted": "Política excluída",
"policy_management": "Gerenciamento de Políticas",
"policy_name": "Nome da política",
"policy_violation_audit": "Auditoria de violação de política",
"policy_violations": "Violações de política",
"policy_violations_by_classification": "Violações de política por classificação",
"policy_violations_by_state": "Violações de políticas por estado",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@
"policy_deleted": "Política excluída",
"policy_management": "Gerenciamento de Políticas",
"policy_name": "Nome da política",
"policy_violation_audit": "Auditoria de violação de políticas",
"policy_violations": "Violações de política",
"policy_violations_by_classification": "Violações de política por classificação",
"policy_violations_by_state": "Violações de políticas por estado",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@
"policy_deleted": "Политика удалена.",
"policy_management": "Управление политиками",
"policy_name": "Имя политики",
"policy_violation_audit": "Аудит нарушений политики",
"policy_violations": "Нарушения политики",
"policy_violations_by_classification": "Нарушения политики по классификации",
"policy_violations_by_state": "Нарушения политики государством",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/uk-UA.json
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@
"policy_deleted": "Політику видалено",
"policy_management": "Управління політикою",
"policy_name": "Назва політики",
"policy_violation_audit": "Аудит порушень політики",
"policy_violations": "Порушення політики",
"policy_violations_by_classification": "Порушення політики за класифікацією",
"policy_violations_by_state": "Порушення політики державою",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@
"policy_deleted": "策略已删除",
"policy_management": "策略管理",
"policy_name": "策略名称",
"policy_violation_audit": "政策违规审计",
"policy_violations": "违反策略",
"policy_violations_by_classification": "违反策略的分类",
"policy_violations_by_state": "违反策略的情况",
Expand Down
12 changes: 12 additions & 0 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const LicenseList = () => import('@/views/portfolio/licenses/LicenseList');
const PolicyManagement = () => import('@/views/policy/PolicyManagement');
const Project = () => import('@/views/portfolio/projects/Project');

const PolicyViolationAudit = () => import('@/views/audit/PolicyViolationAudit');

const Administration = () => import('@/views/administration/Administration');
const General = () => import('@/views/administration/configuration/General');
const BomFormats = () =>
Expand Down Expand Up @@ -318,6 +320,16 @@ function configRoutes() {
permission: 'POLICY_MANAGEMENT',
},
},
{
path: 'policyViolationAudit',
component: PolicyViolationAudit,
meta: {
title: i18n.t('message.policy_violation_audit'),
i18n: 'message.policy_violation_audit',
sectionPath: '/audit',
permission: 'VIEW_POLICY_VIOLATION',
},
},
{
path: 'admin',
component: Administration,
Expand Down
1 change: 1 addition & 0 deletions src/shared/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const acceptableRootContextPaths = [
'/vulnerability',
'/license',
'/vulnerabilityAudit',
'/policyViolationAudit',
'/login',
'/change-password',
];
Expand Down
Loading

0 comments on commit 8d7cc7d

Please sign in to comment.