mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fixed columns in HBAC/sudo rules list pages.
The following list pages were modified to show these columns only: * HBAC rules: name, type, enabled, description * Sudo rules: name, enabled, description Ticket #1796
This commit is contained in:
parent
fc84af65d5
commit
dea515245c
@ -27,29 +27,31 @@ IPA.entity_factories.hbacrule = function() {
|
||||
return IPA.entity_builder().
|
||||
entity('hbacrule').
|
||||
search_facet({
|
||||
search_all:true,
|
||||
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']
|
||||
search_all: true,
|
||||
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);
|
||||
}
|
||||
},
|
||||
'ipaenabledflag',
|
||||
'description'
|
||||
]
|
||||
}).
|
||||
details_facet({
|
||||
factory: IPA.hbacrule_details_facet
|
||||
}).
|
||||
adder_dialog({
|
||||
fields:['cn']
|
||||
fields: [ 'cn' ]
|
||||
}).
|
||||
build();
|
||||
};
|
||||
@ -143,19 +145,24 @@ IPA.hbacrule_details_facet = function(spec) {
|
||||
function general_section(){
|
||||
var section = IPA.details_table_section({
|
||||
name: 'general',
|
||||
entity:that.entity,
|
||||
entity: that.entity,
|
||||
label: IPA.messages.details.general
|
||||
});
|
||||
|
||||
section.text({name: 'cn', read_only: true});
|
||||
section.text({
|
||||
name: 'cn',
|
||||
read_only: true
|
||||
});
|
||||
section.text({
|
||||
name: 'accessruletype',
|
||||
read_only:true
|
||||
read_only: true
|
||||
});
|
||||
section.textarea({
|
||||
name: 'description'
|
||||
});
|
||||
section.textarea({name: 'description'});
|
||||
section.radio({
|
||||
name: 'ipaenabledflag',
|
||||
options:[
|
||||
options: [
|
||||
{ value: 'TRUE', label: IPA.get_message('true') },
|
||||
{ value: 'FALSE', label: IPA.get_message('false') }
|
||||
]
|
||||
|
@ -28,13 +28,17 @@ IPA.entity_factories.sudorule = function() {
|
||||
return IPA.entity_builder().
|
||||
entity('sudorule').
|
||||
search_facet({
|
||||
columns:['cn','description','cmdcategory']
|
||||
columns: [
|
||||
'cn',
|
||||
'ipaenabledflag',
|
||||
'description'
|
||||
]
|
||||
}).
|
||||
details_facet({
|
||||
factory: IPA.sudorule_details_facet
|
||||
}).
|
||||
adder_dialog({
|
||||
fields:['cn']
|
||||
fields: [ 'cn' ]
|
||||
}).
|
||||
build();
|
||||
};
|
||||
@ -140,14 +144,20 @@ IPA.sudorule_details_facet = function(spec) {
|
||||
facet: that
|
||||
});
|
||||
|
||||
section.text({name: 'cn', read_only: true});
|
||||
section.textarea({name: 'description'});
|
||||
section.text({
|
||||
name: 'cn',
|
||||
read_only: true
|
||||
});
|
||||
section.textarea({
|
||||
name: 'description'
|
||||
});
|
||||
section.radio({
|
||||
name: 'ipaenabledflag',
|
||||
options:[
|
||||
{'value': 'TRUE',label: IPA.messages['true']},
|
||||
{'value': 'FALSE',label:IPA.messages['false']}
|
||||
]});
|
||||
options: [
|
||||
{ value: 'TRUE', label: IPA.get_message('true') },
|
||||
{ value: 'FALSE', label: IPA.get_message('false') }
|
||||
]
|
||||
});
|
||||
return section;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user