summaryrefslogtreecommitdiffstats
path: root/install/ui/hbac.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2011-07-05 17:59:05 -0400
committerEndi S. Dewata <edewata@redhat.com>2011-07-06 21:52:00 +0000
commite4a444ba8159f890daa124d1c546b977a91b9f32 (patch)
tree3a8110eaff3d2d695c4a0592f0f920b361a6a4c3 /install/ui/hbac.js
parentaca908e1e4d08d52a95edca2013c510abe2d1788 (diff)
downloadfreeipa-e4a444ba8159f890daa124d1c546b977a91b9f32.tar.gz
freeipa-e4a444ba8159f890daa124d1c546b977a91b9f32.tar.xz
freeipa-e4a444ba8159f890daa124d1c546b977a91b9f32.zip
HBAC deny warning
shows dialog if there are any HBAC deny rules. Dialog provides option to navigate to the HBAC page. Deny rules have their rule type value show up in red. Only shows up fro administrators, not for self service users. https://fedorahosted.org/freeipa/ticket/1421
Diffstat (limited to 'install/ui/hbac.js')
-rw-r--r--install/ui/hbac.js53
1 files changed, 52 insertions, 1 deletions
diff --git a/install/ui/hbac.js b/install/ui/hbac.js
index c082056bb..dc85d572b 100644
--- a/install/ui/hbac.js
+++ b/install/ui/hbac.js
@@ -26,7 +26,21 @@ IPA.entity_factories.hbacrule = function () {
return IPA.entity_builder().
entity('hbacrule').
search_facet({
- columns:['cn','usercategory','hostcategory','ipaenabledflag',
+ columns:['cn',
+ {
+ factory: IPA.column,
+ name:'accessruletype',
+ setup : function(container,record){
+ container.empty();
+ var value = record[this.name];
+ value = value ? value.toString() : '';
+ if (value === 'deny'){
+ container.addClass('hbac-deny-rule');
+ }
+ container.append(value);
+ }
+ },
+ 'usercategory','hostcategory','ipaenabledflag',
'servicecategory','sourcehostcategory']
}).
details_facet({
@@ -996,3 +1010,40 @@ IPA.hbacrule_accesstime_widget = function (spec) {
return that;
};
+
+IPA.hbac_deny_warning_dialog = function (container) {
+ var dialog = IPA.dialog({
+ 'title': 'HBAC Deny Rules found'
+ });
+
+ var link_path = "config";
+ if (IPA.use_static_files){
+ link_path = "html";
+ }
+
+ dialog.create = function() {
+ dialog.container.append(
+ "HBAC rules with type deny have been found."+
+ " These rules have been deprecated." +
+ " Please remove them, and restructure the HBAC rules." );
+ $('<p/>').append($('<a/>',{
+ text: 'Click here for more information',
+ href: '../' +link_path +'/hbac-deny-remove.html',
+ target: "_blank",
+ style: 'target: tab; color: blue; '
+ })).appendTo(dialog.container);
+ };
+
+ dialog.add_button('Edit HBAC Rules', function() {
+ dialog.close();
+ IPA.nav.show_page('hbacrule', 'search');
+ });
+
+ dialog.add_button('Ignore for now', function() {
+ dialog.close();
+ });
+
+ dialog.init();
+
+ dialog.open();
+};