diff options
author | Endi S. Dewata <edewata@redhat.com> | 2015-04-10 04:44:30 -0400 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2015-04-17 13:29:22 -0400 |
commit | 5c50472a1d91390879a24df7fcfa60d741f1c011 (patch) | |
tree | 9635ebb7ed5e4308cde501c1812e0595854adbe9 /base/server/share/webapps | |
parent | f1f11cd1b2b4dfa0a99cbd47953af0fce4e7ec6c (diff) | |
download | pki-5c50472a1d91390879a24df7fcfa60d741f1c011.tar.gz pki-5c50472a1d91390879a24df7fcfa60d741f1c011.tar.xz pki-5c50472a1d91390879a24df7fcfa60d741f1c011.zip |
Customized TPS UI menu based on user roles.
The TPS UI has been modified to customize the navigation menu
based on the roles of the user currently logged in. TPS agents
do not have access to users, groups, config, authenticators,
connectors, profile mappings, audit, and self tests, so the
corresponding menu items will be hidden. TPS admins have
access to all menu items.
https://fedorahosted.org/pki/ticket/1292
Diffstat (limited to 'base/server/share/webapps')
-rw-r--r-- | base/server/share/webapps/pki/css/pki-ui.css | 5 | ||||
-rw-r--r-- | base/server/share/webapps/pki/js/pki-ui.js | 20 |
2 files changed, 16 insertions, 9 deletions
diff --git a/base/server/share/webapps/pki/css/pki-ui.css b/base/server/share/webapps/pki/css/pki-ui.css index c02028876..0d5edd7fd 100644 --- a/base/server/share/webapps/pki/css/pki-ui.css +++ b/base/server/share/webapps/pki/css/pki-ui.css @@ -41,6 +41,11 @@ display: inline-block; } +.pki-menu { + padding: 0; + list-style-type: none; +} + .pki-actions { float: right; display: inline-block; diff --git a/base/server/share/webapps/pki/js/pki-ui.js b/base/server/share/webapps/pki/js/pki-ui.js index 7d8e6eef6..98e3330c0 100644 --- a/base/server/share/webapps/pki/js/pki-ui.js +++ b/base/server/share/webapps/pki/js/pki-ui.js @@ -925,12 +925,14 @@ var EntryPage = Page.extend({ setup: function() { var self = this; - self.menu = self.$(".pki-menu"); - self.editLink = $("a[name='edit']", self.menu); + self.actions = self.$(".pki-actions"); - self.buttons = self.$(".pki-buttons"); - self.cancelButton = $("button[name='cancel']", self.buttons); - self.saveButton = $("button[name='save']", self.buttons); + self.viewMenu = $(".pki-actions-menu[name='view']", self.actions); + self.editLink = $("a[name='edit']", self.viewMenu); + + self.editMenu = $(".pki-actions-menu[name='edit']", self.actions); + self.cancelButton = $("button[name='cancel']", self.editMenu); + self.saveButton = $("button[name='save']", self.editMenu); self.idField = self.$("input[name='id']"); self.statusField = self.$("input[name='status']"); @@ -996,11 +998,10 @@ var EntryPage = Page.extend({ input.attr("readonly", "readonly"); }); - self.buttons.hide(); - self.menu.show(); + self.viewMenu.show(); + self.editMenu.hide(); } else { - self.menu.hide(); // Show editable fields. self.$(".pki-fields input").each(function(index) { @@ -1013,7 +1014,8 @@ var EntryPage = Page.extend({ } }); - self.buttons.show(); + self.viewMenu.hide(); + self.editMenu.show(); } self.$(".pki-fields input").each(function(index) { |