web ui: do not provide Remove button in subid page

subid range management does not allow to delete ranges

If subid range was allocated, it cannot be removed because there might
be file objects associated with it on one of IPA clients.

In Web UI a button to remove the range should not be shown.

Remove corresponding test from the Web UI test for subid as the button
to remove the subid range is not present anymore.

Fixes: https://pagure.io/freeipa/issue/9150

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Armando Neto <abiagion@redhat.com>
This commit is contained in:
Alexander Bokovoy committed 2022-05-05 15:02:38 +03:00
1 parent b3093d9c39
commit 59cf9017a0
2 files changed
+18 -14

No files matched your search

+18
View File
@@ -16,12 +16,30 @@ define([
var exp = IPA.subid = {};
exp.search_facet_control_buttons_pre_op = function(spec, context) {
spec.control_buttons = [
{
name: 'add',
label: '@i18n:buttons.add',
icon: 'fa-plus'
},
{
name: 'refresh',
label: '@i18n:buttons.refresh',
icon: 'fa-refresh'
}
];
return spec;
};
var make_spec = function() {
return {
name: 'subid',
facets: [
{
$type: 'search',
$pre_ops: [ exp.search_facet_control_buttons_pre_op ],
columns: [
'ipauniqueid',
'ipaowner',
-14
View File
@@ -125,17 +125,3 @@ class test_subid(UI_driver):
self.assert_no_error_dialog()
after_count = self.get_rows()
assert len(before_count) < len(after_count)
@screenshot
def test_subid_del(self):
"""
Test to remove subordinate id for given user.
"""
self.init_app()
self.navigate_to_entity('subid', facet='search')
user_uid = self.get_record_pkey("some-user", "ipaowner",
table_name="ipauniqueid")
before_count = self.get_rows()
self.delete_record(user_uid, table_name="ipauniqueid")
after_count = self.get_rows()
assert len(before_count) > len(after_count)