Skip to content

Commit

Permalink
#1670 #1766 Rearrange admin menu and take into account managePattern,…
Browse files Browse the repository at this point in the history
… manageTaxonomy and managePlatform in the app.index route
  • Loading branch information
nadouani committed Mar 5, 2021
1 parent 14a678c commit c3e0cdd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
6 changes: 6 additions & 0 deletions frontend/app/scripts/services/api/AuthenticationSrv.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@
return 'app.administration.analyzer-templates';
} else if(self.hasPermission('manageObservableTemplate')) {
return 'app.administration.observables';
} else if(self.hasPermission('managePlatform')) {
return 'app.administration.platform';
} else if(self.hasPermission('manageTaxonomy')) {
return 'app.administration.taxonomies';
} else if(self.hasPermission('managePattern')) {
return 'app.administration.attackPatterns';
}
} else {
return 'app.cases';
Expand Down
22 changes: 12 additions & 10 deletions frontend/app/scripts/services/api/ProfileSrv.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,28 @@
admin: {
hints: 'Permissions for administration user profiles',
keys: [
'managePlatform',
'manageUser',
'manageOrganisation',
'manageProfile',
'manageUser',
'manageCustomField',
'manageConfig',
'manageTaxonomy',
'manageProfile',
'manageAnalyzerTemplate',
'manageObservableTemplate'
'manageObservableTemplate',
'manageTaxonomy',
'managePattern',
'managePlatform'
],
labels: {
managePlatform: 'Manage the platform',
manageUser: 'Manage users',
manageOrganisation: 'Manage organisations',
manageProfile: 'Manage profiles',
manageUser: 'Manage users',
manageCustomField: 'Manage custom fields',
manageConfig: 'Manage configurations',
manageTaxonomy: 'Manage taxonomies',
manageProfile: 'Manage profiles',
manageAnalyzerTemplate: 'Manage analyzer templates',
manageObservableTemplate: 'Manage observable types'
manageObservableTemplate: 'Manage observable types',
manageTaxonomy: 'Manage taxonomies',
managePattern: 'Manage attack patterns',
managePlatform: 'Manage the platform'
}
},
org: {
Expand Down
5 changes: 2 additions & 3 deletions frontend/app/views/components/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,20 @@
<span class="hpad5">Analyzer templates</span>
</a>
</li>
<li class="divider"></li>
<li if-permission="manageTaxonomy">
<a ui-sref="app.administration.taxonomies">
<i class="fa fa-tags"></i>
<span class="hpad5">Taxonomies</span>
</a>
</li>
<li>
<li if-permission="managePattern">
<a ui-sref="app.administration.attackPatterns">
<i class="fa fa-tags"></i>
<span class="hpad5">ATT&CK Patterns</span>
</a>
</li>
<li class="divider"></li>
<li>
<li if-permission="managePlatform">
<a ui-sref="app.administration.platform">
<i class="fa fa-wrench"></i>
<span class="hpad5">Platform Status</span>
Expand Down

0 comments on commit c3e0cdd

Please sign in to comment.