[389-ds-base] branch 389-ds-base-1.4.1 updated: Issue 50884 - Health check tool DSEldif check fails
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.1 by this push:
new 74046ab Issue 50884 - Health check tool DSEldif check fails
74046ab is described below
commit 74046abb81f3a066cb11ebd8ac7ed00ff7beee82
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Tue Feb 25 13:40:41 2020 -0500
Issue 50884 - Health check tool DSEldif check fails
Bug Description: dsconf healthcheck was failing depending how the
server id entered. Using "slapd-INSTANCE" vs
"INSTANCE" produced different results.
Fix Description: Normalize the instance name by always stripping
off "slapd-". Also fixes similar issue when ~/.dsrc
is used.
Fixed the RI plugin lint report's inconsistent IDs
Fixed issue how flipend was being called for read-nsstate.
relates: https://pagure.io/389-ds-base/issue/50884
Reviewed by: spichugi & firstyear (Thanks!)
Improve instance name handling robustness
---
src/lib389/lib389/cli_base/__init__.py | 3 ++-
src/lib389/lib389/cli_base/dsrc.py | 23 +++++++++++++++++------
src/lib389/lib389/dseldif.py | 7 +++----
src/lib389/lib389/lint.py | 4 ++--
4 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/src/lib389/lib389/cli_base/__init__.py b/src/lib389/lib389/cli_base/__init__.py
index 231ffe8..92b5640 100644
--- a/src/lib389/lib389/cli_base/__init__.py
+++ b/src/lib389/lib389/cli_base/__init__.py
@@ -150,6 +150,8 @@ def connect_instance(dsrc_inst, verbose, args):
usercert=dsrc_inst['tls_cert'],
userkey=dsrc_inst['tls_key'],
starttls=dsrc_inst['starttls'], connOnly=True)
+ if ds.serverid is not None and ds.serverid.startswith("slapd-"):
+ ds.serverid = ds.serverid.replace("slapd-", "", 1)
return ds
@@ -247,7 +249,6 @@ def _generic_replace_attr(inst, basedn, log, manager_class, args=None):
if "=" in myattr:
[attr, val] = myattr.split("=", 1)
mc.replace(attr, val)
- print("MARK val: " + val)
print("Successfully replaced \"{}\"".format(attr))
else:
raise ValueError("You must specify a value to replace the attribute ({})".format(myattr))
diff --git a/src/lib389/lib389/cli_base/dsrc.py b/src/lib389/lib389/cli_base/dsrc.py
index 20b240d..9cad234 100644
--- a/src/lib389/lib389/cli_base/dsrc.py
+++ b/src/lib389/lib389/cli_base/dsrc.py
@@ -8,7 +8,6 @@
import sys
import os
-import json
import ldap
from lib389.properties import (SER_LDAP_URL, SER_ROOT_DN, SER_LDAPI_ENABLED,
SER_LDAPI_SOCKET, SER_LDAPI_AUTOBIND)
@@ -94,7 +93,7 @@ def dsrc_to_ldap(path, instance_name, log):
The file should be an ini file, and instance should identify a section.
- The ini fileshould have the content:
+ The ini file should have the content:
[instance]
uri = ldaps://hostname:port
@@ -108,13 +107,24 @@ def dsrc_to_ldap(path, instance_name, log):
starttls = [true, false]
"""
config = _read_dsrc(path, log)
+ server_id = instance_name
- # Does our section exist?
- if not config.has_section(instance_name):
- # If not, return none.
- log.debug("dsrc no such section %s" % instance_name)
+ # Do we have an instance name to work with?
+ if instance_name is None:
+ log.debug("No instance name provided")
return None
+ # Strip the prefix
+ if instance_name.startswith("slapd-"):
+ server_id = instance_name = instance_name.replace("slapd-", "", 1)
+
+ if not config.has_section(instance_name):
+ # instance_name does not have a prefix, but dsrc might, so add it
+ instance_name = "slapd-" + instance_name
+ if not config.has_section(instance_name):
+ log.debug("dsrc no such section: %s" % instance_name)
+ return None
+
dsrc_inst = {}
dsrc_inst['args'] = {}
@@ -143,6 +153,7 @@ def dsrc_to_ldap(path, instance_name, log):
dsrc_inst['pwdfile'] = None
dsrc_inst['prompt'] = False
# Now gather the args
+ dsrc_inst['args']['server-id'] = server_id
dsrc_inst['args'][SER_LDAP_URL] = dsrc_inst['uri']
dsrc_inst['args'][SER_ROOT_DN] = dsrc_inst['binddn']
if dsrc_inst['uri'][0:8] == 'ldapi://':
diff --git a/src/lib389/lib389/dseldif.py b/src/lib389/lib389/dseldif.py
index 926dc6b..65f1dee 100644
--- a/src/lib389/lib389/dseldif.py
+++ b/src/lib389/lib389/dseldif.py
@@ -9,7 +9,6 @@
import copy
import os
-import sys
import base64
import time
from struct import pack, unpack
@@ -219,12 +218,12 @@ class DSEldif(object):
endian = "Little Endian"
end = '<'
if flip:
- end = flipend(end)
+ end = self._flipend(end)
elif pack('>h', 1) == pack('=h',1):
endian = "Big Endian"
end = '>'
if flip:
- end = flipend(end)
+ end = self._flipend(end)
else:
raise ValueError("Unknown endian, unable to proceed")
@@ -251,7 +250,7 @@ class DSEldif(object):
# if the sampled time is more than 20 years off, this is
# probably the wrong endianness
if wrongendian:
- end = flipend(end)
+ end = self._flipend(end)
fmtstr = end + base_fmtstr
(rid, sampled_time, local_offset, remote_offset, seq_num) = unpack(fmtstr, nsstate)
tdiff = now-sampled_time
diff --git a/src/lib389/lib389/lint.py b/src/lib389/lib389/lint.py
index 60af195..b5a305b 100644
--- a/src/lib389/lib389/lint.py
+++ b/src/lib389/lib389/lint.py
@@ -135,7 +135,7 @@ minimum version, but doing this affects the entire system:
# RI plugin checks
DSRILE0001 = {
- 'dsle': 'DSRLE0001',
+ 'dsle': 'DSRILE0001',
'severity': 'LOW',
'items' : ['cn=referential integrity postoperation,cn=plugins,cn=config', ],
'detail': """The referential integrity plugin has an asynchronous processing mode.
@@ -162,7 +162,7 @@ You must restart the Directory Server for this change to take effect."""
# Note - ATTR and BACKEND are replaced by the reporting function
DSRILE0002 = {
- 'dsle': 'DSRLE0002',
+ 'dsle': 'DSRILE0002',
'severity': 'HIGH',
'items' : ['cn=referential integrity postoperation,cn=plugins,cn=config'],
'detail': """The referential integrity plugin is configured to use an attribute (ATTR)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[389-ds-base] branch 389-ds-base-1.4.2 updated: Issue 50884 - Health check tool DSEldif check fails
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new 610d2f5 Issue 50884 - Health check tool DSEldif check fails
610d2f5 is described below
commit 610d2f5c6fd889602051959a6217cb793cb5b65f
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Tue Feb 25 13:40:41 2020 -0500
Issue 50884 - Health check tool DSEldif check fails
Bug Description: dsconf healthcheck was failing depending how the
server id entered. Using "slapd-INSTANCE" vs
"INSTANCE" produced different results.
Fix Description: Normalize the instance name by always stripping
off "slapd-". Also fixes similar issue when ~/.dsrc
is used.
Fixed the RI plugin lint report's inconsistent IDs
Fixed issue how flipend was being called for read-nsstate.
relates: https://pagure.io/389-ds-base/issue/50884
Reviewed by: spichugi & firstyear (Thanks!)
Improve instance name handling robustness
---
src/lib389/lib389/cli_base/__init__.py | 3 ++-
src/lib389/lib389/cli_base/dsrc.py | 23 +++++++++++++++++------
src/lib389/lib389/dseldif.py | 7 +++----
src/lib389/lib389/lint.py | 4 ++--
4 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/src/lib389/lib389/cli_base/__init__.py b/src/lib389/lib389/cli_base/__init__.py
index 231ffe8..92b5640 100644
--- a/src/lib389/lib389/cli_base/__init__.py
+++ b/src/lib389/lib389/cli_base/__init__.py
@@ -150,6 +150,8 @@ def connect_instance(dsrc_inst, verbose, args):
usercert=dsrc_inst['tls_cert'],
userkey=dsrc_inst['tls_key'],
starttls=dsrc_inst['starttls'], connOnly=True)
+ if ds.serverid is not None and ds.serverid.startswith("slapd-"):
+ ds.serverid = ds.serverid.replace("slapd-", "", 1)
return ds
@@ -247,7 +249,6 @@ def _generic_replace_attr(inst, basedn, log, manager_class, args=None):
if "=" in myattr:
[attr, val] = myattr.split("=", 1)
mc.replace(attr, val)
- print("MARK val: " + val)
print("Successfully replaced \"{}\"".format(attr))
else:
raise ValueError("You must specify a value to replace the attribute ({})".format(myattr))
diff --git a/src/lib389/lib389/cli_base/dsrc.py b/src/lib389/lib389/cli_base/dsrc.py
index 20b240d..9cad234 100644
--- a/src/lib389/lib389/cli_base/dsrc.py
+++ b/src/lib389/lib389/cli_base/dsrc.py
@@ -8,7 +8,6 @@
import sys
import os
-import json
import ldap
from lib389.properties import (SER_LDAP_URL, SER_ROOT_DN, SER_LDAPI_ENABLED,
SER_LDAPI_SOCKET, SER_LDAPI_AUTOBIND)
@@ -94,7 +93,7 @@ def dsrc_to_ldap(path, instance_name, log):
The file should be an ini file, and instance should identify a section.
- The ini fileshould have the content:
+ The ini file should have the content:
[instance]
uri = ldaps://hostname:port
@@ -108,13 +107,24 @@ def dsrc_to_ldap(path, instance_name, log):
starttls = [true, false]
"""
config = _read_dsrc(path, log)
+ server_id = instance_name
- # Does our section exist?
- if not config.has_section(instance_name):
- # If not, return none.
- log.debug("dsrc no such section %s" % instance_name)
+ # Do we have an instance name to work with?
+ if instance_name is None:
+ log.debug("No instance name provided")
return None
+ # Strip the prefix
+ if instance_name.startswith("slapd-"):
+ server_id = instance_name = instance_name.replace("slapd-", "", 1)
+
+ if not config.has_section(instance_name):
+ # instance_name does not have a prefix, but dsrc might, so add it
+ instance_name = "slapd-" + instance_name
+ if not config.has_section(instance_name):
+ log.debug("dsrc no such section: %s" % instance_name)
+ return None
+
dsrc_inst = {}
dsrc_inst['args'] = {}
@@ -143,6 +153,7 @@ def dsrc_to_ldap(path, instance_name, log):
dsrc_inst['pwdfile'] = None
dsrc_inst['prompt'] = False
# Now gather the args
+ dsrc_inst['args']['server-id'] = server_id
dsrc_inst['args'][SER_LDAP_URL] = dsrc_inst['uri']
dsrc_inst['args'][SER_ROOT_DN] = dsrc_inst['binddn']
if dsrc_inst['uri'][0:8] == 'ldapi://':
diff --git a/src/lib389/lib389/dseldif.py b/src/lib389/lib389/dseldif.py
index 1cafaef..5378e6e 100644
--- a/src/lib389/lib389/dseldif.py
+++ b/src/lib389/lib389/dseldif.py
@@ -9,7 +9,6 @@
import copy
import os
-import sys
import base64
import time
from struct import pack, unpack
@@ -218,12 +217,12 @@ class DSEldif(object):
endian = "Little Endian"
end = '<'
if flip:
- end = flipend(end)
+ end = self._flipend(end)
elif pack('>h', 1) == pack('=h',1):
endian = "Big Endian"
end = '>'
if flip:
- end = flipend(end)
+ end = self._flipend(end)
else:
raise ValueError("Unknown endian, unable to proceed")
@@ -250,7 +249,7 @@ class DSEldif(object):
# if the sampled time is more than 20 years off, this is
# probably the wrong endianness
if wrongendian:
- end = flipend(end)
+ end = self._flipend(end)
fmtstr = end + base_fmtstr
(rid, sampled_time, local_offset, remote_offset, seq_num) = unpack(fmtstr, nsstate)
tdiff = now-sampled_time
diff --git a/src/lib389/lib389/lint.py b/src/lib389/lib389/lint.py
index 60af195..b5a305b 100644
--- a/src/lib389/lib389/lint.py
+++ b/src/lib389/lib389/lint.py
@@ -135,7 +135,7 @@ minimum version, but doing this affects the entire system:
# RI plugin checks
DSRILE0001 = {
- 'dsle': 'DSRLE0001',
+ 'dsle': 'DSRILE0001',
'severity': 'LOW',
'items' : ['cn=referential integrity postoperation,cn=plugins,cn=config', ],
'detail': """The referential integrity plugin has an asynchronous processing mode.
@@ -162,7 +162,7 @@ You must restart the Directory Server for this change to take effect."""
# Note - ATTR and BACKEND are replaced by the reporting function
DSRILE0002 = {
- 'dsle': 'DSRLE0002',
+ 'dsle': 'DSRILE0002',
'severity': 'HIGH',
'items' : ['cn=referential integrity postoperation,cn=plugins,cn=config'],
'detail': """The referential integrity plugin is configured to use an attribute (ATTR)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[389-ds-base] branch 389-ds-base-1.4.1 updated: Issue 50926 - Remove dual spinner and other UI fixes
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.1 by this push:
new 3af86a0 Issue 50926 - Remove dual spinner and other UI fixes
3af86a0 is described below
commit 3af86a083194a4398cf5d7142a86cc515462fa9c
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Tue Mar 3 16:08:57 2020 -0500
Issue 50926 - Remove dual spinner and other UI fixes
Description: Removed unnecessary spinner when loading the backup table.
Removed duplicate ID's from html
Revised Create Instance modal to be easier to read
Fixed typo in posix winsync fixup task help description
Removed unused CSS styles
Fixed plugin modal alignment issues
Fixed typo in Enable Replication modal
relates: https://pagure.io/389-ds-base/issue/50926
Reviewed by: spichugi(Thanks!)
---
src/cockpit/389-console/src/css/ds.css | 176 ---------------------
src/cockpit/389-console/src/ds.jsx | 62 +++-----
.../389-console/src/lib/customTableToolbar.jsx | 1 -
.../src/lib/database/databaseTables.jsx | 1 +
src/cockpit/389-console/src/lib/dsTable.jsx | 3 +-
.../src/lib/plugins/attributeUniqueness.jsx | 30 ++--
.../389-console/src/lib/plugins/autoMembership.jsx | 47 ++----
src/cockpit/389-console/src/lib/plugins/dna.jsx | 16 +-
.../src/lib/plugins/linkedAttributes.jsx | 24 +--
.../389-console/src/lib/plugins/managedEntries.jsx | 28 ++--
.../389-console/src/lib/plugins/memberOf.jsx | 9 +-
.../src/lib/plugins/passthroughAuthentication.jsx | 86 +++++-----
.../389-console/src/lib/replication/replModals.jsx | 2 +-
src/cockpit/389-console/src/monitor.jsx | 10 +-
src/cockpit/389-console/src/plugins.jsx | 3 +-
.../lib389/cli_conf/plugins/posix_winsync.py | 2 +-
16 files changed, 134 insertions(+), 366 deletions(-)
diff --git a/src/cockpit/389-console/src/css/ds.css b/src/cockpit/389-console/src/css/ds.css
index 76bf2a9..9248116 100644
--- a/src/cockpit/389-console/src/css/ds.css
+++ b/src/cockpit/389-console/src/css/ds.css
@@ -23,16 +23,6 @@
text-align: left !important;
}
-/* Main nav page index.html */
-.ds-content {
- padding: 0;
- padding-top: 115px; /* this pushes the content below fixed nav bar */
- padding-bottom: 50px;
- margin-top: 0;
- margin-right: 10px;
- margin-bottom: 10px;
-}
-
.ds-chart-right {
margin-left: 65px;
}
@@ -70,25 +60,6 @@ td {
max-width: 200px !important;
}
-.ds-hr {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- border-style: inset;
- border-width: 1px;
- padding: 0px !important;
-}
-
-.ds-hr-logs {
- display: block;
- margin-left: 0;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- border-style: inset;
- border-width: 1px;
- padding: 0px !important;
- width: 525px;
-}
-
.ds-no-padding {
padding: 0px !important;
}
@@ -117,10 +88,6 @@ td {
opacity: 0.7;
}
-.ds-split {
- width: 400px;
-}
-
.ds-input {
margin-top: 5px !important;
padding-right: 5px !important;
@@ -141,20 +108,6 @@ td {
text-align: right;
}
-.ds-pw-input {
- margin-top: 5px;
- padding-right: 5px;
- padding-left: 5px !important;
- min-width: 65px !important;
- max-width: 65px !important;
-}
-
-.ds-history-input {
- margin-top: !important;
- margin-right: 5px;
- margin-left: 40px;
-}
-
.ds-divider {
width: 35px;
}
@@ -180,27 +133,6 @@ td {
text-align: left;
}
-.ds-dblink-form-input {
- width: 415px !important;
- margin-top: 5px;
- padding-right: 10px;
- height: 37px !important;
-}
-
-.ds-repl-table {
- background-color: white !important;
- padding: 0px !important;
- border: 1px solid #909090;
- table-layout: fixed;
- width: 100%;
- clear: both;
- word-wrap: break-word !important;
- text-align: center;
- margin-top: -10px !important;
- line-height: 1;
-}
-
-
.ds-db-table {
border: 1px solid #d1d1d1;
word-wrap: break-word !important;
@@ -270,12 +202,6 @@ td {
margin-right: 5px !important;
}
-.ds-send-expiring-checkbox {
- margin-top: 12px !important;
- margin-right: 12px !important;
- padding: 5px;
-}
-
.ds-operate-spinner {
margin-left: 10px;
top: 10px;
@@ -298,38 +224,11 @@ td {
margin-bottom: 10px !important;
}
-.ds-config-label-lrg {
- margin-top: 10px;
- width: 160px !important;
- margin-bottom: 10px !important;
-}
-
-.ds-config-sub-label {
- margin-top: 10px;
- width: 225px !important;
- margin-bottom: 10px !important;
- padding-left: 20px;
-}
-
.ds-label-sm {
width: 175px !important;
margin-bottom: 10px !important;
}
-.ds-expire-label {
- margin-top: 7px;
- margin-bottom: 7px;
- width: 285px !important;
-}
-
-.ds-minage-label {
- padding: 10px;
-}
-
-.ds-expired-div {
- padding-left: 30px !important;
-}
-
.ds-modal-row {
margin-left: 20px;
margin-right: 0px !important;
@@ -348,17 +247,6 @@ td {
width: 85px;
}
-.ds-oc-form-list {
- width: 232px !important;
- max-height: 350px !important;
- min-height: 350px !important;
-}
-
-.ds-oc-form-list:focus {
- max-height: 350px !important;
- min-height: 350px !important;
-}
-
p {
line-height: 1;
white-space: normal;
@@ -435,11 +323,6 @@ option {
background-color: #f3f3f3;
}
-.ds-nav-tab a {
- text-align: center;
- min-width: 125px !important;
-}
-
.ds-float-right {
float: right;
}
@@ -459,29 +342,6 @@ option {
Width: 18px !important;
}
-.ds-footer {
- background-color: #f5f5f5 !important;
- margin-left: -25px;
- padding: 10px;
- position: fixed;
- bottom: 0;
- width: 100%;
- height: 50px;
- border-top: 1px solid #e2e2e2 !important;
-}
-
-.ds-nav-bar {
- position: fixed;
- top: 0;
- width: 100%;
- background-color: white;
- z-index: 1;
-}
-
-.ds-nav-item a {
- text-align: left;
-}
-
.ds-config-header {
margin-bottom: 20px;
}
@@ -555,38 +415,6 @@ option {
overflow-y:auto;
}
-/* wizard accordions are narrower */
-.ds-wiz-accordion {
- margin-top: 20px;
- color: #228bc0 !important;
- background-color: white;
- border: 0;
- position: relative;
- overflow: hidden;
- width: 500px;
- text-align: left;
-}
-
-.ds-wiz-accordion:after {
- display: inline-block;
- content: "";
- height: 1px;
- background: #228bc0;
- position: absolute;
- width: 500px;
- top: 50% !important;
- margin-left: 10px;
- text-align: left;
-}
-
-.ds-wiz-accordion:focus {
- outline: none !important;
- border: 0 !important;
- -moz-outline: none !important;
- -webkit-box-shadow: none !important;
- box-shadow: 0 !important;
-}
-
.ds-indent {
margin-left: 15px !important;
margin-right: 15px !important;
@@ -678,10 +506,6 @@ option {
transform: translate(-25%, -35%);
}
-.ds-popup {
- min-width: 350px !important;
-}
-
.ds-input-auto {
width: 100%;
margin-right: 10px;
diff --git a/src/cockpit/389-console/src/ds.jsx b/src/cockpit/389-console/src/ds.jsx
index 439a850..c003d16 100644
--- a/src/cockpit/389-console/src/ds.jsx
+++ b/src/cockpit/389-console/src/ds.jsx
@@ -120,13 +120,6 @@ export class DSInstance extends React.Component {
state: "success"
}
}));
- } else {
- this.setState(prevState => ({
- pageLoadingState: {
- ...prevState.pageLoadingState,
- state: "loading"
- }
- }));
}
}
);
@@ -311,9 +304,6 @@ export class DSInstance extends React.Component {
}
loadBackups() {
- this.setState({
- loadingOperate: true
- });
const cmd = ["dsctl", "-j", this.state.serverId, "backups"];
log_cmd("loadBackupsDSInstance", "Load Backups", cmd);
cockpit.spawn(cmd, { superuser: true, err: "message" }).done(content => {
@@ -324,7 +314,6 @@ export class DSInstance extends React.Component {
}
this.setState({
backupRows: rows,
- loadingOperate: false
});
});
}
@@ -490,7 +479,6 @@ export class DSInstance extends React.Component {
} = this.state;
let mainContent = "";
-
if (pageLoadingState.state === "loading") {
mainContent = (
<div id="loading-instances" className="all-pages ds-center">
@@ -760,7 +748,7 @@ class CreateInstanceModal extends React.Component {
createDBSuffix: "",
createDBName: "",
createTLSCert: true,
- createInitDB: "",
+ createInitDB: "noInit",
loadingCreate: false
};
@@ -1088,19 +1076,19 @@ class CreateInstanceModal extends React.Component {
>
<Icon type="pf" name="close" />
</button>
- <Modal.Title>Create New Server Instance</Modal.Title>
+ <Modal.Title className="ds-center">Create New Server Instance</Modal.Title>
</Modal.Header>
<Modal.Body>
<Form horizontal>
<FormGroup controlId="createServerId">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="The instance name, this is what gets appended to 'slapi-'. The instance name can only contain letters, numbers, and: # % : - _"
>
Instance Name
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
id="createServerId"
type="text"
@@ -1113,12 +1101,12 @@ class CreateInstanceModal extends React.Component {
<FormGroup controlId="createPort">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="The server port number"
>
Port
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
type="number"
min="0"
@@ -1131,12 +1119,12 @@ class CreateInstanceModal extends React.Component {
<FormGroup controlId="createSecurePort">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="The secure port number for TLS connections"
>
Secure Port
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
type="number"
min="0"
@@ -1149,12 +1137,12 @@ class CreateInstanceModal extends React.Component {
<FormGroup controlId="createTLSCert">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="Create a self-signed certificate database"
>
- Create Self-Signed TLS Certificate DB
+ Create Self-Signed TLS Certificate
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<Checkbox
id="createTLSCert"
checked={createTLSCert}
@@ -1165,12 +1153,12 @@ class CreateInstanceModal extends React.Component {
<FormGroup controlId="createDM">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="The DN for the unrestricted user"
>
Directory Manager DN
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
type="text"
id="createDM"
@@ -1182,12 +1170,12 @@ class CreateInstanceModal extends React.Component {
<FormGroup controlId="createDMPassword">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="Directory Manager password."
>
Directory Manager Password
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
id="createDMPassword"
type="password"
@@ -1198,10 +1186,10 @@ class CreateInstanceModal extends React.Component {
</Col>
</FormGroup>
<FormGroup controlId="createDMPasswordConfirm">
- <Col componentClass={ControlLabel} sm={4} title="Confirm password.">
+ <Col componentClass={ControlLabel} sm={5} title="Confirm password.">
Confirm Password
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
id="createDMPasswordConfirm"
type="password"
@@ -1213,15 +1201,15 @@ class CreateInstanceModal extends React.Component {
</FormGroup>
<hr />
<h5 className="ds-center">Optional Database Settings</h5>
- <FormGroup controlId="createDBSuffix">
+ <FormGroup className="ds-margin-top-lg" controlId="createDBSuffix">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="Database suffix, like 'dc=example,dc=com'. The suffix must be a valid LDAP Distiguished Name (DN)"
>
Database Suffix
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
type="text"
id="createDBSuffix"
@@ -1234,12 +1222,12 @@ class CreateInstanceModal extends React.Component {
<FormGroup controlId="createDBName">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="The name for the backend database, like 'userroot'. The name can be a combination of alphanumeric characters, dashes (-), and underscores (_). No other characters are allowed, and the name must be unique across all backends."
>
Database Name
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
type="text"
id="createDBName"
@@ -1254,7 +1242,7 @@ class CreateInstanceModal extends React.Component {
controlId="createInitDBn"
disabled={false}
>
- <Col smOffset={4} sm={8}>
+ <Col smOffset={5} sm={7}>
<Radio
id="createInitDB"
value="noInit"
@@ -1272,7 +1260,7 @@ class CreateInstanceModal extends React.Component {
controlId="createInitDBs"
disabled={false}
>
- <Col smOffset={4} sm={8}>
+ <Col smOffset={5} sm={7}>
<Radio
id="createInitDB"
value="createSuffix"
@@ -1290,7 +1278,7 @@ class CreateInstanceModal extends React.Component {
controlId="createInitDBp"
disabled={false}
>
- <Col smOffset={4} sm={8}>
+ <Col smOffset={5} sm={7}>
<Radio
id="createInitDB"
value="createSample"
diff --git a/src/cockpit/389-console/src/lib/customTableToolbar.jsx b/src/cockpit/389-console/src/lib/customTableToolbar.jsx
index d6b6e2e..6605591 100644
--- a/src/cockpit/389-console/src/lib/customTableToolbar.jsx
+++ b/src/cockpit/389-console/src/lib/customTableToolbar.jsx
@@ -36,7 +36,6 @@ class CustomTableToolbar extends React.Component {
<div className="ds-float-left">
<FormControl
type="text"
- id="find"
placeholder={placeholder}
value={searchFilterValue}
onChange={handleValueChange}
diff --git a/src/cockpit/389-console/src/lib/database/databaseTables.jsx b/src/cockpit/389-console/src/lib/database/databaseTables.jsx
index beca690..67bae31 100644
--- a/src/cockpit/389-console/src/lib/database/databaseTables.jsx
+++ b/src/cockpit/389-console/src/lib/database/databaseTables.jsx
@@ -930,6 +930,7 @@ class BackupTable extends React.Component {
} else {
backupTable =
<DSTable
+ id="backupTable"
noSearchBar
getColumns={this.getColumns}
rowKey={this.state.rowKey}
diff --git a/src/cockpit/389-console/src/lib/dsTable.jsx b/src/cockpit/389-console/src/lib/dsTable.jsx
index 4b17840..399f1a3 100644
--- a/src/cockpit/389-console/src/lib/dsTable.jsx
+++ b/src/cockpit/389-console/src/lib/dsTable.jsx
@@ -273,7 +273,6 @@ class DSTable extends React.Component {
onNextPage={this.onNextPage}
onLastPage={this.onLastPage}
onSubmit={this.onSubmit}
- id={this.props.searchField}
/>
</div>
);
@@ -400,7 +399,7 @@ DSTable.propTypes = {
toolBarDisableLoadingSpinner: PropTypes.bool,
toolBarPagination: PropTypes.array,
toolBarPaginationPerPage: PropTypes.number,
- noSearchBar: PropTypes.bool
+ noSearchBar: PropTypes.bool,
};
DSShortTable.propTypes = {
diff --git a/src/cockpit/389-console/src/lib/plugins/attributeUniqueness.jsx b/src/cockpit/389-console/src/lib/plugins/attributeUniqueness.jsx
index 66453f9..e31532c 100644
--- a/src/cockpit/389-console/src/lib/plugins/attributeUniqueness.jsx
+++ b/src/cockpit/389-console/src/lib/plugins/attributeUniqueness.jsx
@@ -467,12 +467,14 @@ class AttributeUniqueness extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup controlId="configName">
- <Col sm={3}>
- <ControlLabel title='Sets the name of the plug-in configuration record. (cn) You can use any string, but "attribute_name Attribute Uniqueness" is recommended.'>
- Config Name
- </ControlLabel>
+ <Col
+ componentClass={ControlLabel}
+ sm={4}
+ title='Sets the name of the plug-in configuration record. (cn) You can use any string, but "attribute_name Attribute Uniqueness" is recommended.'
+ >
+ Config Name
</Col>
- <Col sm={9}>
+ <Col sm={8}>
<FormControl
type="text"
value={configName}
@@ -488,12 +490,12 @@ class AttributeUniqueness extends React.Component {
>
<Col
componentClass={ControlLabel}
- sm={3}
+ sm={4}
title="Sets the name of the attribute whose values must be unique. This attribute is multi-valued. (uniqueness-attribute-name)"
>
Attribute Names
</Col>
- <Col sm={9}>
+ <Col sm={8}>
<Typeahead
allowNew
multiple
@@ -516,12 +518,12 @@ class AttributeUniqueness extends React.Component {
>
<Col
componentClass={ControlLabel}
- sm={3}
+ sm={4}
title="Sets the DN under which the plug-in checks for uniqueness of the attributes value. This attribute is multi-valued (uniqueness-subtrees)"
>
Subtrees
</Col>
- <Col sm={9}>
+ <Col sm={8}>
<Typeahead
allowNew
multiple
@@ -550,12 +552,12 @@ class AttributeUniqueness extends React.Component {
>
<Col
componentClass={ControlLabel}
- sm={3}
+ sm={4}
title="Verifies that the value of the attribute set in uniqueness-attribute-name is unique in this subtree (uniqueness-top-entry-oc)"
>
Top Entry OC
</Col>
- <Col sm={9}>
+ <Col sm={8}>
<Typeahead
allowNew
onChange={value => {
@@ -577,12 +579,12 @@ class AttributeUniqueness extends React.Component {
>
<Col
componentClass={ControlLabel}
- sm={3}
+ sm={4}
title="Verifies if an attribute is unique, if the entry contains the object class set in this parameter (uniqueness-subtree-entries-oc)"
>
Subtree Entries OC
</Col>
- <Col sm={6}>
+ <Col sm={5}>
<Typeahead
allowNew
onChange={value => {
@@ -614,7 +616,7 @@ class AttributeUniqueness extends React.Component {
>
<Col
componentClass={ControlLabel}
- sm={3}
+ sm={4}
title="Identifies whether or not the config is enabled."
>
Enable config
diff --git a/src/cockpit/389-console/src/lib/plugins/autoMembership.jsx b/src/cockpit/389-console/src/lib/plugins/autoMembership.jsx
index 6de8d3a..ab0661c 100644
--- a/src/cockpit/389-console/src/lib/plugins/autoMembership.jsx
+++ b/src/cockpit/389-console/src/lib/plugins/autoMembership.jsx
@@ -771,8 +771,8 @@ class AutoMembership extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup key="definitionName" controlId="definitionName">
- <Col sm={3}>
- <ControlLabel>Definition Name</ControlLabel>
+ <Col componentClass={ControlLabel} sm={3}>
+ Definition Name
</Col>
<Col sm={9}>
<FormControl
@@ -787,10 +787,8 @@ class AutoMembership extends React.Component {
{Object.entries(modalDefinitionFields).map(
([id, content]) => (
<FormGroup key={id} controlId={id}>
- <Col sm={3}>
- <ControlLabel title={content.help}>
- {content.name}
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title={content.help}>
+ {content.name}
</Col>
<Col sm={9}>
<FormControl
@@ -806,12 +804,8 @@ class AutoMembership extends React.Component {
key="groupingAttrEntry"
controlId="groupingAttrEntry"
>
- <Col sm={3}>
- <ControlLabel
- title={`Specifies the name of the member attribute in the group entry and the attribute in the object entry that supplies the member attribute value, in the format group_member_attr:entry_attr (autoMemberGroupingAttr)`}
- >
- Grouping Attributes
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Specifies the name of the member attribute in the group entry and the attribute in the object entry that supplies the member attribute value, in the format group_member_attr:entry_attr (autoMemberGroupingAttr)">
+ Grouping Attributes
</Col>
<Col sm={4}>
<Typeahead
@@ -840,6 +834,7 @@ class AutoMembership extends React.Component {
</Form>
</Col>
</Row>
+ <hr />
<Row>
<Col sm={12}>
<AutoMembershipRegexTable
@@ -898,8 +893,8 @@ class AutoMembership extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup key="regexName" controlId="regexName">
- <Col sm={3}>
- <ControlLabel>Regex Name</ControlLabel>
+ <Col componentClass={ControlLabel} sm={3}>
+ Regex Name
</Col>
<Col sm={9}>
<FormControl
@@ -912,12 +907,8 @@ class AutoMembership extends React.Component {
</Col>
</FormGroup>
<FormGroup key="regexExclusive" controlId="regexExclusive">
- <Col sm={3}>
- <ControlLabel
- title={`Sets a single regular expression to use to identify entries to exclude (autoMemberExclusiveRegex)`}
- >
- Exclusive Regex
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Sets a single regular expression to use to identify entries to exclude (autoMemberExclusiveRegex)">
+ Exclusive Regex
</Col>
<Col sm={9}>
<Typeahead
@@ -936,12 +927,8 @@ class AutoMembership extends React.Component {
</Col>
</FormGroup>
<FormGroup key="regexInclusive" controlId="regexInclusive">
- <Col sm={3}>
- <ControlLabel
- title={`Sets a single regular expression to use to identify entries to exclude (autoMemberExclusiveRegex)`}
- >
- Inclusive Regex
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Sets a single regular expression to use to identify entries to exclude (autoMemberExclusiveRegex)">
+ Inclusive Regex
</Col>
<Col sm={9}>
<Typeahead
@@ -963,12 +950,8 @@ class AutoMembership extends React.Component {
key="regexTargetGroup"
controlId="regexTargetGroup"
>
- <Col sm={3}>
- <ControlLabel
- title={`Sets which group to add the entry to as a member, if it meets the regular expression conditions (autoMemberTargetGroup)`}
- >
- Target Group
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Sets which group to add the entry to as a member, if it meets the regular expression conditions (autoMemberTargetGroup)">
+ Target Group
</Col>
<Col sm={9}>
<FormControl
diff --git a/src/cockpit/389-console/src/lib/plugins/dna.jsx b/src/cockpit/389-console/src/lib/plugins/dna.jsx
index 4539255..f4b1e05 100644
--- a/src/cockpit/389-console/src/lib/plugins/dna.jsx
+++ b/src/cockpit/389-console/src/lib/plugins/dna.jsx
@@ -880,8 +880,8 @@ class DNA extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup key="configName" controlId="configName">
- <Col sm={4}>
- <ControlLabel>Config Name</ControlLabel>
+ <Col componentClass={ControlLabel} sm={4}>
+ Config Name
</Col>
<Col sm={8}>
<FormControl
@@ -921,10 +921,8 @@ class DNA extends React.Component {
</Col>
</FormGroup>
<FormGroup key="type" controlId="type">
- <Col sm={4}>
- <ControlLabel title="Sets which attributes have unique numbers being generated for them (dnaType)">
- Type
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={4} title="Sets which attributes have unique numbers being generated for them (dnaType)">
+ Type
</Col>
<Col sm={8}>
<Typeahead
@@ -944,10 +942,8 @@ class DNA extends React.Component {
</FormGroup>
{Object.entries(modalConfigFields).map(([id, content]) => (
<FormGroup key={id} controlId={id}>
- <Col sm={4}>
- <ControlLabel title={content.help}>
- {content.name}
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={4} title={content.help}>
+ {content.name}
</Col>
<Col sm={8}>
<FormControl
diff --git a/src/cockpit/389-console/src/lib/plugins/linkedAttributes.jsx b/src/cockpit/389-console/src/lib/plugins/linkedAttributes.jsx
index 30900f7..accd694 100644
--- a/src/cockpit/389-console/src/lib/plugins/linkedAttributes.jsx
+++ b/src/cockpit/389-console/src/lib/plugins/linkedAttributes.jsx
@@ -353,10 +353,8 @@ class LinkedAttributes extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup controlId="configName">
- <Col sm={3}>
- <ControlLabel title="The Linked Attributes configuration name">
- Config Name
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="The Linked Attributes configuration name">
+ Config Name
</Col>
<Col sm={9}>
<FormControl
@@ -368,10 +366,8 @@ class LinkedAttributes extends React.Component {
</Col>
</FormGroup>
<FormGroup controlId="linkType">
- <Col sm={3}>
- <ControlLabel title="Sets the attribute that is managed manually by administrators (linkType)">
- Link Type
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Sets the attribute that is managed manually by administrators (linkType)">
+ Link Type
</Col>
<Col sm={9}>
<Typeahead
@@ -389,10 +385,8 @@ class LinkedAttributes extends React.Component {
</Col>
</FormGroup>
<FormGroup controlId="managedType">
- <Col sm={3}>
- <ControlLabel title="Sets the attribute that is created dynamically by the plugin (managedType)">
- Managed Type
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Sets the attribute that is created dynamically by the plugin (managedType)">
+ Managed Type
</Col>
<Col sm={9}>
<Typeahead
@@ -410,10 +404,8 @@ class LinkedAttributes extends React.Component {
</Col>
</FormGroup>
<FormGroup controlId="linkScope">
- <Col sm={3}>
- <ControlLabel title="Sets the base DN that restricts the plugin to a specific part of the directory tree (linkScope)">
- Link Scope
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Sets the base DN that restricts the plugin to a specific part of the directory tree (linkScope)">
+ Link Scope
</Col>
<Col sm={9}>
<FormControl
diff --git a/src/cockpit/389-console/src/lib/plugins/managedEntries.jsx b/src/cockpit/389-console/src/lib/plugins/managedEntries.jsx
index b403fb2..679e919 100644
--- a/src/cockpit/389-console/src/lib/plugins/managedEntries.jsx
+++ b/src/cockpit/389-console/src/lib/plugins/managedEntries.jsx
@@ -614,8 +614,8 @@ class ManagedEntries extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup key="configName" controlId="configName">
- <Col sm={3}>
- <ControlLabel>Config Name</ControlLabel>
+ <Col componentClass={ControlLabel} sm={3}>
+ Config Name
</Col>
<Col sm={9}>
<FormControl
@@ -629,10 +629,8 @@ class ManagedEntries extends React.Component {
</FormGroup>
{Object.entries(modalConfigFields).map(([id, content]) => (
<FormGroup key={id} controlId={id}>
- <Col sm={3}>
- <ControlLabel title={content.help}>
- {content.name}
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title={content.help}>
+ {content.name}
</Col>
<Col sm={9}>
<FormControl
@@ -709,10 +707,8 @@ class ManagedEntries extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup controlId="templateDN">
- <Col sm={4}>
- <ControlLabel title="DN of the template entry">
- Template DN
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={4} title="DN of the template entry">
+ Template DN
</Col>
<Col sm={8}>
<FormControl
@@ -761,10 +757,8 @@ class ManagedEntries extends React.Component {
controlId="templateStaticAttr"
disabled={false}
>
- <Col sm={4}>
- <ControlLabel title="Sets an attribute with a defined value that must be added to the automatically-generated entry (mepStaticAttr)">
- Static Attribute
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={4} title="Sets an attribute with a defined value that must be added to the automatically-generated entry (mepStaticAttr)">
+ Static Attribute
</Col>
<Col sm={8}>
<Typeahead
@@ -786,10 +780,8 @@ class ManagedEntries extends React.Component {
controlId="templateMappedAttr"
disabled={false}
>
- <Col sm={4}>
- <ControlLabel title="Sets attributes in the Managed Entries template entry which must exist in the generated entry (mepMappedAttr)">
- Mapped Attributes
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={4} title="Sets attributes in the Managed Entries template entry which must exist in the generated entry (mepMappedAttr)">
+ Mapped Attributes
</Col>
<Col sm={8}>
<Typeahead
diff --git a/src/cockpit/389-console/src/lib/plugins/memberOf.jsx b/src/cockpit/389-console/src/lib/plugins/memberOf.jsx
index 9cbceff..74a74e6 100644
--- a/src/cockpit/389-console/src/lib/plugins/memberOf.jsx
+++ b/src/cockpit/389-console/src/lib/plugins/memberOf.jsx
@@ -815,10 +815,8 @@ class MemberOf extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup controlId="configAutoAddOC" disabled={false}>
- <Col sm={3}>
- <ControlLabel title="If an entry does not have an object class that allows the memberOf attribute then the memberOf plugin will automatically add the object class listed in the memberOfAutoAddOC parameter">
- Auto Add OC
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="If an entry does not have an object class that allows the memberOf attribute then the memberOf plugin will automatically add the object class listed in the memberOfAutoAddOC parameter">
+ Auto Add OC
</Col>
<Col sm={9}>
<Typeahead
@@ -1042,10 +1040,11 @@ class MemberOf extends React.Component {
<Form horizontal>
<FormGroup controlId="memberOfAutoAddOC" disabled={false}>
<Col
+ componentClass={ControlLabel}
sm={3}
title="If an entry does not have an object class that allows the memberOf attribute then the memberOf plugin will automatically add the object class listed in the memberOfAutoAddOC parameter"
>
- <ControlLabel>Auto Add OC</ControlLabel>
+ Auto Add OC
</Col>
<Col sm={8}>
<Typeahead
diff --git a/src/cockpit/389-console/src/lib/plugins/passthroughAuthentication.jsx b/src/cockpit/389-console/src/lib/plugins/passthroughAuthentication.jsx
index d0c4787..6b2d067 100644
--- a/src/cockpit/389-console/src/lib/plugins/passthroughAuthentication.jsx
+++ b/src/cockpit/389-console/src/lib/plugins/passthroughAuthentication.jsx
@@ -759,8 +759,8 @@ class PassthroughAuthentication extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup key="pamConfigName" controlId="pamConfigName">
- <Col sm={3}>
- <ControlLabel>Config Name</ControlLabel>
+ <Col componentClass={ControlLabel} sm={3}>
+ Config Name
</Col>
<Col sm={9}>
<FormControl
@@ -833,10 +833,8 @@ class PassthroughAuthentication extends React.Component {
controlId="pamIDAttr"
disabled={false}
>
- <Col sm={3}>
- <ControlLabel title="Contains the attribute name which is used to hold the PAM user ID (pamIDAttr)">
- ID Attribute
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Contains the attribute name which is used to hold the PAM user ID (pamIDAttr)">
+ ID Attribute
</Col>
<Col sm={9}>
<Typeahead
@@ -904,10 +902,8 @@ class PassthroughAuthentication extends React.Component {
{Object.entries(modalPAMConfigFields).map(
([id, content]) => (
<FormGroup key={id} controlId={id}>
- <Col sm={3}>
- <ControlLabel title={content.help}>
- {content.name}
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title={content.help}>
+ {content.name}
</Col>
<Col sm={9}>
<FormControl
@@ -921,26 +917,30 @@ class PassthroughAuthentication extends React.Component {
)}
<FormGroup key="pamCheckboxes" controlId="pamCheckboxes">
- <Col sm={4}>
- <Checkbox
- id="pamFallback"
- checked={pamFallback}
- onChange={this.handleCheckboxChange}
- title={`Sets whether to fallback to regular LDAP authentication if PAM authentication fails (pamFallback)`}
- >
- Fallback
- </Checkbox>
- </Col>
- <Col sm={4}>
- <Checkbox
- id="pamSecure"
- checked={pamSecure}
- onChange={this.handleCheckboxChange}
- title="Requires secure TLS connection for PAM authentication (pamSecure)"
- >
- Secure
- </Checkbox>
- </Col>
+ <Row>
+ <Col smOffset={1} sm={7}>
+ <Checkbox
+ id="pamFallback"
+ checked={pamFallback}
+ onChange={this.handleCheckboxChange}
+ title={`Sets whether to fallback to regular LDAP authentication if PAM authentication fails (pamFallback)`}
+ >
+ Fallback Enabled
+ </Checkbox>
+ </Col>
+ </Row>
+ <Row className="ds-margin-top">
+ <Col smOffset={1} sm={7}>
+ <Checkbox
+ id="pamSecure"
+ checked={pamSecure}
+ onChange={this.handleCheckboxChange}
+ title="Requires secure TLS connection for PAM authentication (pamSecure)"
+ >
+ Require Secure Connection
+ </Checkbox>
+ </Col>
+ </Row>
</FormGroup>
</Form>
</Col>
@@ -975,7 +975,7 @@ class PassthroughAuthentication extends React.Component {
<Icon type="pf" name="close" />
</button>
<Modal.Title>
- {newPAMConfigEntry ? "Add" : "Edit"}
+ {newPAMConfigEntry ? "Add " : "Edit "}
Passthough Authentication Plugin URL
</Modal.Title>
</Modal.Header>
@@ -1022,10 +1022,8 @@ class PassthroughAuthentication extends React.Component {
</FormGroup>
{Object.entries(modalURLFields).map(([id, content]) => (
<FormGroup key={id} controlId={id}>
- <Col sm={5}>
- <ControlLabel title={content.help}>
- {content.name}
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={5} title={content.help}>
+ {content.name}
</Col>
<Col sm={7}>
<FormControl
@@ -1075,7 +1073,7 @@ class PassthroughAuthentication extends React.Component {
</Col>
</FormGroup>
<FormGroup key="urlStartTLS" controlId="urlStartTLS">
- <Col sm={4}>
+ <Col componentClass={ControlLabel} sm={5}>
<Checkbox
id="urlStartTLS"
checked={urlStartTLS}
@@ -1087,18 +1085,14 @@ class PassthroughAuthentication extends React.Component {
</Col>
</FormGroup>
<FormGroup key="resultURL" controlId="resultURL">
- <Col sm={5}>
- <ControlLabel title="The URL that will be added or modified after you click 'Save'">
- Result URL
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={5} title="The URL that will be added or modified after you click 'Save'">
+ Result URL
</Col>
<Col sm={7}>
- <ControlLabel>
- {urlConnType}://{urlAuthDS}/{urlSubtree}{" "}
- {urlMaxConns},{urlMaxOps},{urlTimeout},
- {urlLDVer},{urlConnLifeTime},
- {urlStartTLS ? "1" : "0"}
- </ControlLabel>
+ {urlConnType}://{urlAuthDS}/{urlSubtree}{" "}
+ {urlMaxConns},{urlMaxOps},{urlTimeout},
+ {urlLDVer},{urlConnLifeTime},
+ {urlStartTLS ? "1" : "0"}
</Col>
</FormGroup>
</Form>
diff --git a/src/cockpit/389-console/src/lib/replication/replModals.jsx b/src/cockpit/389-console/src/lib/replication/replModals.jsx
index 4c15d71..0ea6f47 100644
--- a/src/cockpit/389-console/src/lib/replication/replModals.jsx
+++ b/src/cockpit/389-console/src/lib/replication/replModals.jsx
@@ -1300,7 +1300,7 @@ export class EnableReplModal extends React.Component {
<p className="ds-margin-top-xxlg">
You can optionally define the authentication information
for this replicated suffix. Either a Manager DN and Password,
- a Bind Group DN, or both, can be provideed. The Manager DN should
+ a Bind Group DN, or both, can be provided. The Manager DN should
be an entry under "cn=config" and if it does not exist it will
be created, while the Bind Group DN is usually an existing
group located in the database suffix. Typically, just the
diff --git a/src/cockpit/389-console/src/monitor.jsx b/src/cockpit/389-console/src/monitor.jsx
index a155f49..0b0c08e 100644
--- a/src/cockpit/389-console/src/monitor.jsx
+++ b/src/cockpit/389-console/src/monitor.jsx
@@ -166,11 +166,6 @@ export class Monitor extends React.Component {
}
loadSuffixTree(fullReset) {
- if (this.state.firstLoad) {
- this.setState({
- firstLoad: false
- });
- }
const cmd = [
"dsconf", "-j", "ldapi://%2fvar%2frun%2fslapd-" + this.props.serverId + ".socket",
"backend", "get-tree",
@@ -408,6 +403,11 @@ export class Monitor extends React.Component {
// - SNMP
// - Finally load the "tree"
//
+ if (this.state.firstLoad) {
+ this.setState({
+ firstLoad: false
+ });
+ }
let cmd = [
"dsconf", "-j", "ldapi://%2fvar%2frun%2fslapd-" + this.props.serverId + ".socket",
"config", "get", "nsslapd-auditlog", "nsslapd-accesslog", "nsslapd-errorlog", "nsslapd-auditfaillog"
diff --git a/src/cockpit/389-console/src/plugins.jsx b/src/cockpit/389-console/src/plugins.jsx
index ae24945..53ef514 100644
--- a/src/cockpit/389-console/src/plugins.jsx
+++ b/src/cockpit/389-console/src/plugins.jsx
@@ -162,8 +162,7 @@ export class Plugins extends React.Component {
var myObject = JSON.parse(content);
this.setState({
rows: myObject.items
- });
- this.toggleLoading();
+ }, this.toggleLoading());
})
.fail(err => {
if (err != 0) {
diff --git a/src/lib389/lib389/cli_conf/plugins/posix_winsync.py b/src/lib389/lib389/cli_conf/plugins/posix_winsync.py
index 0512418..d4de7ae 100644
--- a/src/lib389/lib389/cli_conf/plugins/posix_winsync.py
+++ b/src/lib389/lib389/cli_conf/plugins/posix_winsync.py
@@ -41,7 +41,7 @@ def do_fixup(inst, basedn, log, args):
def _add_parser_args(parser):
parser.add_argument('--create-memberof-task', choices=['true', 'false'], type=str.lower,
- help='Sets whether to run the memberOf fix-up task immediately after a sync run in order '
+ help='Sets whether to run the memberUID fix-up task immediately after a sync run in order '
'to update group memberships for synced users (posixWinsyncCreateMemberOfTask)')
parser.add_argument('--lower-case-uid', choices=['true', 'false'], type=str.lower,
help='Sets whether to store (and, if necessary, convert) the UID value in the memberUID '
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[389-ds-base] branch 389-ds-base-1.4.2 updated: Issue 50926 - Remove dual spinner and other UI fixes
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new f479c20 Issue 50926 - Remove dual spinner and other UI fixes
f479c20 is described below
commit f479c20430d225d4696a1aefeab5a0df30c53018
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Tue Mar 3 16:08:57 2020 -0500
Issue 50926 - Remove dual spinner and other UI fixes
Description: Removed unnecessary spinner when loading the backup table.
Removed duplicate ID's from html
Revised Create Instance modal to be easier to read
Fixed typo in posix winsync fixup task help description
Removed unused CSS styles
Fixed plugin modal alignment issues
Fixed typo in Enable Replication modal
relates: https://pagure.io/389-ds-base/issue/50926
Reviewed by: spichugi(Thanks!)
---
src/cockpit/389-console/src/css/ds.css | 176 ---------------------
src/cockpit/389-console/src/ds.jsx | 62 +++-----
.../389-console/src/lib/customTableToolbar.jsx | 1 -
.../src/lib/database/databaseTables.jsx | 1 +
src/cockpit/389-console/src/lib/dsTable.jsx | 3 +-
.../src/lib/plugins/attributeUniqueness.jsx | 30 ++--
.../389-console/src/lib/plugins/autoMembership.jsx | 47 ++----
src/cockpit/389-console/src/lib/plugins/dna.jsx | 16 +-
.../src/lib/plugins/linkedAttributes.jsx | 24 +--
.../389-console/src/lib/plugins/managedEntries.jsx | 28 ++--
.../389-console/src/lib/plugins/memberOf.jsx | 9 +-
.../src/lib/plugins/passthroughAuthentication.jsx | 86 +++++-----
.../389-console/src/lib/replication/replModals.jsx | 2 +-
src/cockpit/389-console/src/monitor.jsx | 10 +-
src/cockpit/389-console/src/plugins.jsx | 3 +-
.../lib389/cli_conf/plugins/posix_winsync.py | 2 +-
16 files changed, 134 insertions(+), 366 deletions(-)
diff --git a/src/cockpit/389-console/src/css/ds.css b/src/cockpit/389-console/src/css/ds.css
index 76bf2a9..9248116 100644
--- a/src/cockpit/389-console/src/css/ds.css
+++ b/src/cockpit/389-console/src/css/ds.css
@@ -23,16 +23,6 @@
text-align: left !important;
}
-/* Main nav page index.html */
-.ds-content {
- padding: 0;
- padding-top: 115px; /* this pushes the content below fixed nav bar */
- padding-bottom: 50px;
- margin-top: 0;
- margin-right: 10px;
- margin-bottom: 10px;
-}
-
.ds-chart-right {
margin-left: 65px;
}
@@ -70,25 +60,6 @@ td {
max-width: 200px !important;
}
-.ds-hr {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- border-style: inset;
- border-width: 1px;
- padding: 0px !important;
-}
-
-.ds-hr-logs {
- display: block;
- margin-left: 0;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- border-style: inset;
- border-width: 1px;
- padding: 0px !important;
- width: 525px;
-}
-
.ds-no-padding {
padding: 0px !important;
}
@@ -117,10 +88,6 @@ td {
opacity: 0.7;
}
-.ds-split {
- width: 400px;
-}
-
.ds-input {
margin-top: 5px !important;
padding-right: 5px !important;
@@ -141,20 +108,6 @@ td {
text-align: right;
}
-.ds-pw-input {
- margin-top: 5px;
- padding-right: 5px;
- padding-left: 5px !important;
- min-width: 65px !important;
- max-width: 65px !important;
-}
-
-.ds-history-input {
- margin-top: !important;
- margin-right: 5px;
- margin-left: 40px;
-}
-
.ds-divider {
width: 35px;
}
@@ -180,27 +133,6 @@ td {
text-align: left;
}
-.ds-dblink-form-input {
- width: 415px !important;
- margin-top: 5px;
- padding-right: 10px;
- height: 37px !important;
-}
-
-.ds-repl-table {
- background-color: white !important;
- padding: 0px !important;
- border: 1px solid #909090;
- table-layout: fixed;
- width: 100%;
- clear: both;
- word-wrap: break-word !important;
- text-align: center;
- margin-top: -10px !important;
- line-height: 1;
-}
-
-
.ds-db-table {
border: 1px solid #d1d1d1;
word-wrap: break-word !important;
@@ -270,12 +202,6 @@ td {
margin-right: 5px !important;
}
-.ds-send-expiring-checkbox {
- margin-top: 12px !important;
- margin-right: 12px !important;
- padding: 5px;
-}
-
.ds-operate-spinner {
margin-left: 10px;
top: 10px;
@@ -298,38 +224,11 @@ td {
margin-bottom: 10px !important;
}
-.ds-config-label-lrg {
- margin-top: 10px;
- width: 160px !important;
- margin-bottom: 10px !important;
-}
-
-.ds-config-sub-label {
- margin-top: 10px;
- width: 225px !important;
- margin-bottom: 10px !important;
- padding-left: 20px;
-}
-
.ds-label-sm {
width: 175px !important;
margin-bottom: 10px !important;
}
-.ds-expire-label {
- margin-top: 7px;
- margin-bottom: 7px;
- width: 285px !important;
-}
-
-.ds-minage-label {
- padding: 10px;
-}
-
-.ds-expired-div {
- padding-left: 30px !important;
-}
-
.ds-modal-row {
margin-left: 20px;
margin-right: 0px !important;
@@ -348,17 +247,6 @@ td {
width: 85px;
}
-.ds-oc-form-list {
- width: 232px !important;
- max-height: 350px !important;
- min-height: 350px !important;
-}
-
-.ds-oc-form-list:focus {
- max-height: 350px !important;
- min-height: 350px !important;
-}
-
p {
line-height: 1;
white-space: normal;
@@ -435,11 +323,6 @@ option {
background-color: #f3f3f3;
}
-.ds-nav-tab a {
- text-align: center;
- min-width: 125px !important;
-}
-
.ds-float-right {
float: right;
}
@@ -459,29 +342,6 @@ option {
Width: 18px !important;
}
-.ds-footer {
- background-color: #f5f5f5 !important;
- margin-left: -25px;
- padding: 10px;
- position: fixed;
- bottom: 0;
- width: 100%;
- height: 50px;
- border-top: 1px solid #e2e2e2 !important;
-}
-
-.ds-nav-bar {
- position: fixed;
- top: 0;
- width: 100%;
- background-color: white;
- z-index: 1;
-}
-
-.ds-nav-item a {
- text-align: left;
-}
-
.ds-config-header {
margin-bottom: 20px;
}
@@ -555,38 +415,6 @@ option {
overflow-y:auto;
}
-/* wizard accordions are narrower */
-.ds-wiz-accordion {
- margin-top: 20px;
- color: #228bc0 !important;
- background-color: white;
- border: 0;
- position: relative;
- overflow: hidden;
- width: 500px;
- text-align: left;
-}
-
-.ds-wiz-accordion:after {
- display: inline-block;
- content: "";
- height: 1px;
- background: #228bc0;
- position: absolute;
- width: 500px;
- top: 50% !important;
- margin-left: 10px;
- text-align: left;
-}
-
-.ds-wiz-accordion:focus {
- outline: none !important;
- border: 0 !important;
- -moz-outline: none !important;
- -webkit-box-shadow: none !important;
- box-shadow: 0 !important;
-}
-
.ds-indent {
margin-left: 15px !important;
margin-right: 15px !important;
@@ -678,10 +506,6 @@ option {
transform: translate(-25%, -35%);
}
-.ds-popup {
- min-width: 350px !important;
-}
-
.ds-input-auto {
width: 100%;
margin-right: 10px;
diff --git a/src/cockpit/389-console/src/ds.jsx b/src/cockpit/389-console/src/ds.jsx
index 439a850..c003d16 100644
--- a/src/cockpit/389-console/src/ds.jsx
+++ b/src/cockpit/389-console/src/ds.jsx
@@ -120,13 +120,6 @@ export class DSInstance extends React.Component {
state: "success"
}
}));
- } else {
- this.setState(prevState => ({
- pageLoadingState: {
- ...prevState.pageLoadingState,
- state: "loading"
- }
- }));
}
}
);
@@ -311,9 +304,6 @@ export class DSInstance extends React.Component {
}
loadBackups() {
- this.setState({
- loadingOperate: true
- });
const cmd = ["dsctl", "-j", this.state.serverId, "backups"];
log_cmd("loadBackupsDSInstance", "Load Backups", cmd);
cockpit.spawn(cmd, { superuser: true, err: "message" }).done(content => {
@@ -324,7 +314,6 @@ export class DSInstance extends React.Component {
}
this.setState({
backupRows: rows,
- loadingOperate: false
});
});
}
@@ -490,7 +479,6 @@ export class DSInstance extends React.Component {
} = this.state;
let mainContent = "";
-
if (pageLoadingState.state === "loading") {
mainContent = (
<div id="loading-instances" className="all-pages ds-center">
@@ -760,7 +748,7 @@ class CreateInstanceModal extends React.Component {
createDBSuffix: "",
createDBName: "",
createTLSCert: true,
- createInitDB: "",
+ createInitDB: "noInit",
loadingCreate: false
};
@@ -1088,19 +1076,19 @@ class CreateInstanceModal extends React.Component {
>
<Icon type="pf" name="close" />
</button>
- <Modal.Title>Create New Server Instance</Modal.Title>
+ <Modal.Title className="ds-center">Create New Server Instance</Modal.Title>
</Modal.Header>
<Modal.Body>
<Form horizontal>
<FormGroup controlId="createServerId">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="The instance name, this is what gets appended to 'slapi-'. The instance name can only contain letters, numbers, and: # % : - _"
>
Instance Name
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
id="createServerId"
type="text"
@@ -1113,12 +1101,12 @@ class CreateInstanceModal extends React.Component {
<FormGroup controlId="createPort">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="The server port number"
>
Port
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
type="number"
min="0"
@@ -1131,12 +1119,12 @@ class CreateInstanceModal extends React.Component {
<FormGroup controlId="createSecurePort">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="The secure port number for TLS connections"
>
Secure Port
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
type="number"
min="0"
@@ -1149,12 +1137,12 @@ class CreateInstanceModal extends React.Component {
<FormGroup controlId="createTLSCert">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="Create a self-signed certificate database"
>
- Create Self-Signed TLS Certificate DB
+ Create Self-Signed TLS Certificate
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<Checkbox
id="createTLSCert"
checked={createTLSCert}
@@ -1165,12 +1153,12 @@ class CreateInstanceModal extends React.Component {
<FormGroup controlId="createDM">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="The DN for the unrestricted user"
>
Directory Manager DN
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
type="text"
id="createDM"
@@ -1182,12 +1170,12 @@ class CreateInstanceModal extends React.Component {
<FormGroup controlId="createDMPassword">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="Directory Manager password."
>
Directory Manager Password
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
id="createDMPassword"
type="password"
@@ -1198,10 +1186,10 @@ class CreateInstanceModal extends React.Component {
</Col>
</FormGroup>
<FormGroup controlId="createDMPasswordConfirm">
- <Col componentClass={ControlLabel} sm={4} title="Confirm password.">
+ <Col componentClass={ControlLabel} sm={5} title="Confirm password.">
Confirm Password
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
id="createDMPasswordConfirm"
type="password"
@@ -1213,15 +1201,15 @@ class CreateInstanceModal extends React.Component {
</FormGroup>
<hr />
<h5 className="ds-center">Optional Database Settings</h5>
- <FormGroup controlId="createDBSuffix">
+ <FormGroup className="ds-margin-top-lg" controlId="createDBSuffix">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="Database suffix, like 'dc=example,dc=com'. The suffix must be a valid LDAP Distiguished Name (DN)"
>
Database Suffix
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
type="text"
id="createDBSuffix"
@@ -1234,12 +1222,12 @@ class CreateInstanceModal extends React.Component {
<FormGroup controlId="createDBName">
<Col
componentClass={ControlLabel}
- sm={4}
+ sm={5}
title="The name for the backend database, like 'userroot'. The name can be a combination of alphanumeric characters, dashes (-), and underscores (_). No other characters are allowed, and the name must be unique across all backends."
>
Database Name
</Col>
- <Col sm={8}>
+ <Col sm={7}>
<FormControl
type="text"
id="createDBName"
@@ -1254,7 +1242,7 @@ class CreateInstanceModal extends React.Component {
controlId="createInitDBn"
disabled={false}
>
- <Col smOffset={4} sm={8}>
+ <Col smOffset={5} sm={7}>
<Radio
id="createInitDB"
value="noInit"
@@ -1272,7 +1260,7 @@ class CreateInstanceModal extends React.Component {
controlId="createInitDBs"
disabled={false}
>
- <Col smOffset={4} sm={8}>
+ <Col smOffset={5} sm={7}>
<Radio
id="createInitDB"
value="createSuffix"
@@ -1290,7 +1278,7 @@ class CreateInstanceModal extends React.Component {
controlId="createInitDBp"
disabled={false}
>
- <Col smOffset={4} sm={8}>
+ <Col smOffset={5} sm={7}>
<Radio
id="createInitDB"
value="createSample"
diff --git a/src/cockpit/389-console/src/lib/customTableToolbar.jsx b/src/cockpit/389-console/src/lib/customTableToolbar.jsx
index d6b6e2e..6605591 100644
--- a/src/cockpit/389-console/src/lib/customTableToolbar.jsx
+++ b/src/cockpit/389-console/src/lib/customTableToolbar.jsx
@@ -36,7 +36,6 @@ class CustomTableToolbar extends React.Component {
<div className="ds-float-left">
<FormControl
type="text"
- id="find"
placeholder={placeholder}
value={searchFilterValue}
onChange={handleValueChange}
diff --git a/src/cockpit/389-console/src/lib/database/databaseTables.jsx b/src/cockpit/389-console/src/lib/database/databaseTables.jsx
index beca690..67bae31 100644
--- a/src/cockpit/389-console/src/lib/database/databaseTables.jsx
+++ b/src/cockpit/389-console/src/lib/database/databaseTables.jsx
@@ -930,6 +930,7 @@ class BackupTable extends React.Component {
} else {
backupTable =
<DSTable
+ id="backupTable"
noSearchBar
getColumns={this.getColumns}
rowKey={this.state.rowKey}
diff --git a/src/cockpit/389-console/src/lib/dsTable.jsx b/src/cockpit/389-console/src/lib/dsTable.jsx
index 4b17840..399f1a3 100644
--- a/src/cockpit/389-console/src/lib/dsTable.jsx
+++ b/src/cockpit/389-console/src/lib/dsTable.jsx
@@ -273,7 +273,6 @@ class DSTable extends React.Component {
onNextPage={this.onNextPage}
onLastPage={this.onLastPage}
onSubmit={this.onSubmit}
- id={this.props.searchField}
/>
</div>
);
@@ -400,7 +399,7 @@ DSTable.propTypes = {
toolBarDisableLoadingSpinner: PropTypes.bool,
toolBarPagination: PropTypes.array,
toolBarPaginationPerPage: PropTypes.number,
- noSearchBar: PropTypes.bool
+ noSearchBar: PropTypes.bool,
};
DSShortTable.propTypes = {
diff --git a/src/cockpit/389-console/src/lib/plugins/attributeUniqueness.jsx b/src/cockpit/389-console/src/lib/plugins/attributeUniqueness.jsx
index 66453f9..e31532c 100644
--- a/src/cockpit/389-console/src/lib/plugins/attributeUniqueness.jsx
+++ b/src/cockpit/389-console/src/lib/plugins/attributeUniqueness.jsx
@@ -467,12 +467,14 @@ class AttributeUniqueness extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup controlId="configName">
- <Col sm={3}>
- <ControlLabel title='Sets the name of the plug-in configuration record. (cn) You can use any string, but "attribute_name Attribute Uniqueness" is recommended.'>
- Config Name
- </ControlLabel>
+ <Col
+ componentClass={ControlLabel}
+ sm={4}
+ title='Sets the name of the plug-in configuration record. (cn) You can use any string, but "attribute_name Attribute Uniqueness" is recommended.'
+ >
+ Config Name
</Col>
- <Col sm={9}>
+ <Col sm={8}>
<FormControl
type="text"
value={configName}
@@ -488,12 +490,12 @@ class AttributeUniqueness extends React.Component {
>
<Col
componentClass={ControlLabel}
- sm={3}
+ sm={4}
title="Sets the name of the attribute whose values must be unique. This attribute is multi-valued. (uniqueness-attribute-name)"
>
Attribute Names
</Col>
- <Col sm={9}>
+ <Col sm={8}>
<Typeahead
allowNew
multiple
@@ -516,12 +518,12 @@ class AttributeUniqueness extends React.Component {
>
<Col
componentClass={ControlLabel}
- sm={3}
+ sm={4}
title="Sets the DN under which the plug-in checks for uniqueness of the attributes value. This attribute is multi-valued (uniqueness-subtrees)"
>
Subtrees
</Col>
- <Col sm={9}>
+ <Col sm={8}>
<Typeahead
allowNew
multiple
@@ -550,12 +552,12 @@ class AttributeUniqueness extends React.Component {
>
<Col
componentClass={ControlLabel}
- sm={3}
+ sm={4}
title="Verifies that the value of the attribute set in uniqueness-attribute-name is unique in this subtree (uniqueness-top-entry-oc)"
>
Top Entry OC
</Col>
- <Col sm={9}>
+ <Col sm={8}>
<Typeahead
allowNew
onChange={value => {
@@ -577,12 +579,12 @@ class AttributeUniqueness extends React.Component {
>
<Col
componentClass={ControlLabel}
- sm={3}
+ sm={4}
title="Verifies if an attribute is unique, if the entry contains the object class set in this parameter (uniqueness-subtree-entries-oc)"
>
Subtree Entries OC
</Col>
- <Col sm={6}>
+ <Col sm={5}>
<Typeahead
allowNew
onChange={value => {
@@ -614,7 +616,7 @@ class AttributeUniqueness extends React.Component {
>
<Col
componentClass={ControlLabel}
- sm={3}
+ sm={4}
title="Identifies whether or not the config is enabled."
>
Enable config
diff --git a/src/cockpit/389-console/src/lib/plugins/autoMembership.jsx b/src/cockpit/389-console/src/lib/plugins/autoMembership.jsx
index 6de8d3a..ab0661c 100644
--- a/src/cockpit/389-console/src/lib/plugins/autoMembership.jsx
+++ b/src/cockpit/389-console/src/lib/plugins/autoMembership.jsx
@@ -771,8 +771,8 @@ class AutoMembership extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup key="definitionName" controlId="definitionName">
- <Col sm={3}>
- <ControlLabel>Definition Name</ControlLabel>
+ <Col componentClass={ControlLabel} sm={3}>
+ Definition Name
</Col>
<Col sm={9}>
<FormControl
@@ -787,10 +787,8 @@ class AutoMembership extends React.Component {
{Object.entries(modalDefinitionFields).map(
([id, content]) => (
<FormGroup key={id} controlId={id}>
- <Col sm={3}>
- <ControlLabel title={content.help}>
- {content.name}
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title={content.help}>
+ {content.name}
</Col>
<Col sm={9}>
<FormControl
@@ -806,12 +804,8 @@ class AutoMembership extends React.Component {
key="groupingAttrEntry"
controlId="groupingAttrEntry"
>
- <Col sm={3}>
- <ControlLabel
- title={`Specifies the name of the member attribute in the group entry and the attribute in the object entry that supplies the member attribute value, in the format group_member_attr:entry_attr (autoMemberGroupingAttr)`}
- >
- Grouping Attributes
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Specifies the name of the member attribute in the group entry and the attribute in the object entry that supplies the member attribute value, in the format group_member_attr:entry_attr (autoMemberGroupingAttr)">
+ Grouping Attributes
</Col>
<Col sm={4}>
<Typeahead
@@ -840,6 +834,7 @@ class AutoMembership extends React.Component {
</Form>
</Col>
</Row>
+ <hr />
<Row>
<Col sm={12}>
<AutoMembershipRegexTable
@@ -898,8 +893,8 @@ class AutoMembership extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup key="regexName" controlId="regexName">
- <Col sm={3}>
- <ControlLabel>Regex Name</ControlLabel>
+ <Col componentClass={ControlLabel} sm={3}>
+ Regex Name
</Col>
<Col sm={9}>
<FormControl
@@ -912,12 +907,8 @@ class AutoMembership extends React.Component {
</Col>
</FormGroup>
<FormGroup key="regexExclusive" controlId="regexExclusive">
- <Col sm={3}>
- <ControlLabel
- title={`Sets a single regular expression to use to identify entries to exclude (autoMemberExclusiveRegex)`}
- >
- Exclusive Regex
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Sets a single regular expression to use to identify entries to exclude (autoMemberExclusiveRegex)">
+ Exclusive Regex
</Col>
<Col sm={9}>
<Typeahead
@@ -936,12 +927,8 @@ class AutoMembership extends React.Component {
</Col>
</FormGroup>
<FormGroup key="regexInclusive" controlId="regexInclusive">
- <Col sm={3}>
- <ControlLabel
- title={`Sets a single regular expression to use to identify entries to exclude (autoMemberExclusiveRegex)`}
- >
- Inclusive Regex
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Sets a single regular expression to use to identify entries to exclude (autoMemberExclusiveRegex)">
+ Inclusive Regex
</Col>
<Col sm={9}>
<Typeahead
@@ -963,12 +950,8 @@ class AutoMembership extends React.Component {
key="regexTargetGroup"
controlId="regexTargetGroup"
>
- <Col sm={3}>
- <ControlLabel
- title={`Sets which group to add the entry to as a member, if it meets the regular expression conditions (autoMemberTargetGroup)`}
- >
- Target Group
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Sets which group to add the entry to as a member, if it meets the regular expression conditions (autoMemberTargetGroup)">
+ Target Group
</Col>
<Col sm={9}>
<FormControl
diff --git a/src/cockpit/389-console/src/lib/plugins/dna.jsx b/src/cockpit/389-console/src/lib/plugins/dna.jsx
index 4539255..f4b1e05 100644
--- a/src/cockpit/389-console/src/lib/plugins/dna.jsx
+++ b/src/cockpit/389-console/src/lib/plugins/dna.jsx
@@ -880,8 +880,8 @@ class DNA extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup key="configName" controlId="configName">
- <Col sm={4}>
- <ControlLabel>Config Name</ControlLabel>
+ <Col componentClass={ControlLabel} sm={4}>
+ Config Name
</Col>
<Col sm={8}>
<FormControl
@@ -921,10 +921,8 @@ class DNA extends React.Component {
</Col>
</FormGroup>
<FormGroup key="type" controlId="type">
- <Col sm={4}>
- <ControlLabel title="Sets which attributes have unique numbers being generated for them (dnaType)">
- Type
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={4} title="Sets which attributes have unique numbers being generated for them (dnaType)">
+ Type
</Col>
<Col sm={8}>
<Typeahead
@@ -944,10 +942,8 @@ class DNA extends React.Component {
</FormGroup>
{Object.entries(modalConfigFields).map(([id, content]) => (
<FormGroup key={id} controlId={id}>
- <Col sm={4}>
- <ControlLabel title={content.help}>
- {content.name}
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={4} title={content.help}>
+ {content.name}
</Col>
<Col sm={8}>
<FormControl
diff --git a/src/cockpit/389-console/src/lib/plugins/linkedAttributes.jsx b/src/cockpit/389-console/src/lib/plugins/linkedAttributes.jsx
index 30900f7..accd694 100644
--- a/src/cockpit/389-console/src/lib/plugins/linkedAttributes.jsx
+++ b/src/cockpit/389-console/src/lib/plugins/linkedAttributes.jsx
@@ -353,10 +353,8 @@ class LinkedAttributes extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup controlId="configName">
- <Col sm={3}>
- <ControlLabel title="The Linked Attributes configuration name">
- Config Name
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="The Linked Attributes configuration name">
+ Config Name
</Col>
<Col sm={9}>
<FormControl
@@ -368,10 +366,8 @@ class LinkedAttributes extends React.Component {
</Col>
</FormGroup>
<FormGroup controlId="linkType">
- <Col sm={3}>
- <ControlLabel title="Sets the attribute that is managed manually by administrators (linkType)">
- Link Type
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Sets the attribute that is managed manually by administrators (linkType)">
+ Link Type
</Col>
<Col sm={9}>
<Typeahead
@@ -389,10 +385,8 @@ class LinkedAttributes extends React.Component {
</Col>
</FormGroup>
<FormGroup controlId="managedType">
- <Col sm={3}>
- <ControlLabel title="Sets the attribute that is created dynamically by the plugin (managedType)">
- Managed Type
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Sets the attribute that is created dynamically by the plugin (managedType)">
+ Managed Type
</Col>
<Col sm={9}>
<Typeahead
@@ -410,10 +404,8 @@ class LinkedAttributes extends React.Component {
</Col>
</FormGroup>
<FormGroup controlId="linkScope">
- <Col sm={3}>
- <ControlLabel title="Sets the base DN that restricts the plugin to a specific part of the directory tree (linkScope)">
- Link Scope
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Sets the base DN that restricts the plugin to a specific part of the directory tree (linkScope)">
+ Link Scope
</Col>
<Col sm={9}>
<FormControl
diff --git a/src/cockpit/389-console/src/lib/plugins/managedEntries.jsx b/src/cockpit/389-console/src/lib/plugins/managedEntries.jsx
index b403fb2..679e919 100644
--- a/src/cockpit/389-console/src/lib/plugins/managedEntries.jsx
+++ b/src/cockpit/389-console/src/lib/plugins/managedEntries.jsx
@@ -614,8 +614,8 @@ class ManagedEntries extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup key="configName" controlId="configName">
- <Col sm={3}>
- <ControlLabel>Config Name</ControlLabel>
+ <Col componentClass={ControlLabel} sm={3}>
+ Config Name
</Col>
<Col sm={9}>
<FormControl
@@ -629,10 +629,8 @@ class ManagedEntries extends React.Component {
</FormGroup>
{Object.entries(modalConfigFields).map(([id, content]) => (
<FormGroup key={id} controlId={id}>
- <Col sm={3}>
- <ControlLabel title={content.help}>
- {content.name}
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title={content.help}>
+ {content.name}
</Col>
<Col sm={9}>
<FormControl
@@ -709,10 +707,8 @@ class ManagedEntries extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup controlId="templateDN">
- <Col sm={4}>
- <ControlLabel title="DN of the template entry">
- Template DN
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={4} title="DN of the template entry">
+ Template DN
</Col>
<Col sm={8}>
<FormControl
@@ -761,10 +757,8 @@ class ManagedEntries extends React.Component {
controlId="templateStaticAttr"
disabled={false}
>
- <Col sm={4}>
- <ControlLabel title="Sets an attribute with a defined value that must be added to the automatically-generated entry (mepStaticAttr)">
- Static Attribute
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={4} title="Sets an attribute with a defined value that must be added to the automatically-generated entry (mepStaticAttr)">
+ Static Attribute
</Col>
<Col sm={8}>
<Typeahead
@@ -786,10 +780,8 @@ class ManagedEntries extends React.Component {
controlId="templateMappedAttr"
disabled={false}
>
- <Col sm={4}>
- <ControlLabel title="Sets attributes in the Managed Entries template entry which must exist in the generated entry (mepMappedAttr)">
- Mapped Attributes
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={4} title="Sets attributes in the Managed Entries template entry which must exist in the generated entry (mepMappedAttr)">
+ Mapped Attributes
</Col>
<Col sm={8}>
<Typeahead
diff --git a/src/cockpit/389-console/src/lib/plugins/memberOf.jsx b/src/cockpit/389-console/src/lib/plugins/memberOf.jsx
index 9cbceff..74a74e6 100644
--- a/src/cockpit/389-console/src/lib/plugins/memberOf.jsx
+++ b/src/cockpit/389-console/src/lib/plugins/memberOf.jsx
@@ -815,10 +815,8 @@ class MemberOf extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup controlId="configAutoAddOC" disabled={false}>
- <Col sm={3}>
- <ControlLabel title="If an entry does not have an object class that allows the memberOf attribute then the memberOf plugin will automatically add the object class listed in the memberOfAutoAddOC parameter">
- Auto Add OC
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="If an entry does not have an object class that allows the memberOf attribute then the memberOf plugin will automatically add the object class listed in the memberOfAutoAddOC parameter">
+ Auto Add OC
</Col>
<Col sm={9}>
<Typeahead
@@ -1042,10 +1040,11 @@ class MemberOf extends React.Component {
<Form horizontal>
<FormGroup controlId="memberOfAutoAddOC" disabled={false}>
<Col
+ componentClass={ControlLabel}
sm={3}
title="If an entry does not have an object class that allows the memberOf attribute then the memberOf plugin will automatically add the object class listed in the memberOfAutoAddOC parameter"
>
- <ControlLabel>Auto Add OC</ControlLabel>
+ Auto Add OC
</Col>
<Col sm={8}>
<Typeahead
diff --git a/src/cockpit/389-console/src/lib/plugins/passthroughAuthentication.jsx b/src/cockpit/389-console/src/lib/plugins/passthroughAuthentication.jsx
index d0c4787..6b2d067 100644
--- a/src/cockpit/389-console/src/lib/plugins/passthroughAuthentication.jsx
+++ b/src/cockpit/389-console/src/lib/plugins/passthroughAuthentication.jsx
@@ -759,8 +759,8 @@ class PassthroughAuthentication extends React.Component {
<Col sm={12}>
<Form horizontal>
<FormGroup key="pamConfigName" controlId="pamConfigName">
- <Col sm={3}>
- <ControlLabel>Config Name</ControlLabel>
+ <Col componentClass={ControlLabel} sm={3}>
+ Config Name
</Col>
<Col sm={9}>
<FormControl
@@ -833,10 +833,8 @@ class PassthroughAuthentication extends React.Component {
controlId="pamIDAttr"
disabled={false}
>
- <Col sm={3}>
- <ControlLabel title="Contains the attribute name which is used to hold the PAM user ID (pamIDAttr)">
- ID Attribute
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title="Contains the attribute name which is used to hold the PAM user ID (pamIDAttr)">
+ ID Attribute
</Col>
<Col sm={9}>
<Typeahead
@@ -904,10 +902,8 @@ class PassthroughAuthentication extends React.Component {
{Object.entries(modalPAMConfigFields).map(
([id, content]) => (
<FormGroup key={id} controlId={id}>
- <Col sm={3}>
- <ControlLabel title={content.help}>
- {content.name}
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={3} title={content.help}>
+ {content.name}
</Col>
<Col sm={9}>
<FormControl
@@ -921,26 +917,30 @@ class PassthroughAuthentication extends React.Component {
)}
<FormGroup key="pamCheckboxes" controlId="pamCheckboxes">
- <Col sm={4}>
- <Checkbox
- id="pamFallback"
- checked={pamFallback}
- onChange={this.handleCheckboxChange}
- title={`Sets whether to fallback to regular LDAP authentication if PAM authentication fails (pamFallback)`}
- >
- Fallback
- </Checkbox>
- </Col>
- <Col sm={4}>
- <Checkbox
- id="pamSecure"
- checked={pamSecure}
- onChange={this.handleCheckboxChange}
- title="Requires secure TLS connection for PAM authentication (pamSecure)"
- >
- Secure
- </Checkbox>
- </Col>
+ <Row>
+ <Col smOffset={1} sm={7}>
+ <Checkbox
+ id="pamFallback"
+ checked={pamFallback}
+ onChange={this.handleCheckboxChange}
+ title={`Sets whether to fallback to regular LDAP authentication if PAM authentication fails (pamFallback)`}
+ >
+ Fallback Enabled
+ </Checkbox>
+ </Col>
+ </Row>
+ <Row className="ds-margin-top">
+ <Col smOffset={1} sm={7}>
+ <Checkbox
+ id="pamSecure"
+ checked={pamSecure}
+ onChange={this.handleCheckboxChange}
+ title="Requires secure TLS connection for PAM authentication (pamSecure)"
+ >
+ Require Secure Connection
+ </Checkbox>
+ </Col>
+ </Row>
</FormGroup>
</Form>
</Col>
@@ -975,7 +975,7 @@ class PassthroughAuthentication extends React.Component {
<Icon type="pf" name="close" />
</button>
<Modal.Title>
- {newPAMConfigEntry ? "Add" : "Edit"}
+ {newPAMConfigEntry ? "Add " : "Edit "}
Passthough Authentication Plugin URL
</Modal.Title>
</Modal.Header>
@@ -1022,10 +1022,8 @@ class PassthroughAuthentication extends React.Component {
</FormGroup>
{Object.entries(modalURLFields).map(([id, content]) => (
<FormGroup key={id} controlId={id}>
- <Col sm={5}>
- <ControlLabel title={content.help}>
- {content.name}
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={5} title={content.help}>
+ {content.name}
</Col>
<Col sm={7}>
<FormControl
@@ -1075,7 +1073,7 @@ class PassthroughAuthentication extends React.Component {
</Col>
</FormGroup>
<FormGroup key="urlStartTLS" controlId="urlStartTLS">
- <Col sm={4}>
+ <Col componentClass={ControlLabel} sm={5}>
<Checkbox
id="urlStartTLS"
checked={urlStartTLS}
@@ -1087,18 +1085,14 @@ class PassthroughAuthentication extends React.Component {
</Col>
</FormGroup>
<FormGroup key="resultURL" controlId="resultURL">
- <Col sm={5}>
- <ControlLabel title="The URL that will be added or modified after you click 'Save'">
- Result URL
- </ControlLabel>
+ <Col componentClass={ControlLabel} sm={5} title="The URL that will be added or modified after you click 'Save'">
+ Result URL
</Col>
<Col sm={7}>
- <ControlLabel>
- {urlConnType}://{urlAuthDS}/{urlSubtree}{" "}
- {urlMaxConns},{urlMaxOps},{urlTimeout},
- {urlLDVer},{urlConnLifeTime},
- {urlStartTLS ? "1" : "0"}
- </ControlLabel>
+ {urlConnType}://{urlAuthDS}/{urlSubtree}{" "}
+ {urlMaxConns},{urlMaxOps},{urlTimeout},
+ {urlLDVer},{urlConnLifeTime},
+ {urlStartTLS ? "1" : "0"}
</Col>
</FormGroup>
</Form>
diff --git a/src/cockpit/389-console/src/lib/replication/replModals.jsx b/src/cockpit/389-console/src/lib/replication/replModals.jsx
index 4c15d71..0ea6f47 100644
--- a/src/cockpit/389-console/src/lib/replication/replModals.jsx
+++ b/src/cockpit/389-console/src/lib/replication/replModals.jsx
@@ -1300,7 +1300,7 @@ export class EnableReplModal extends React.Component {
<p className="ds-margin-top-xxlg">
You can optionally define the authentication information
for this replicated suffix. Either a Manager DN and Password,
- a Bind Group DN, or both, can be provideed. The Manager DN should
+ a Bind Group DN, or both, can be provided. The Manager DN should
be an entry under "cn=config" and if it does not exist it will
be created, while the Bind Group DN is usually an existing
group located in the database suffix. Typically, just the
diff --git a/src/cockpit/389-console/src/monitor.jsx b/src/cockpit/389-console/src/monitor.jsx
index a155f49..0b0c08e 100644
--- a/src/cockpit/389-console/src/monitor.jsx
+++ b/src/cockpit/389-console/src/monitor.jsx
@@ -166,11 +166,6 @@ export class Monitor extends React.Component {
}
loadSuffixTree(fullReset) {
- if (this.state.firstLoad) {
- this.setState({
- firstLoad: false
- });
- }
const cmd = [
"dsconf", "-j", "ldapi://%2fvar%2frun%2fslapd-" + this.props.serverId + ".socket",
"backend", "get-tree",
@@ -408,6 +403,11 @@ export class Monitor extends React.Component {
// - SNMP
// - Finally load the "tree"
//
+ if (this.state.firstLoad) {
+ this.setState({
+ firstLoad: false
+ });
+ }
let cmd = [
"dsconf", "-j", "ldapi://%2fvar%2frun%2fslapd-" + this.props.serverId + ".socket",
"config", "get", "nsslapd-auditlog", "nsslapd-accesslog", "nsslapd-errorlog", "nsslapd-auditfaillog"
diff --git a/src/cockpit/389-console/src/plugins.jsx b/src/cockpit/389-console/src/plugins.jsx
index ae24945..53ef514 100644
--- a/src/cockpit/389-console/src/plugins.jsx
+++ b/src/cockpit/389-console/src/plugins.jsx
@@ -162,8 +162,7 @@ export class Plugins extends React.Component {
var myObject = JSON.parse(content);
this.setState({
rows: myObject.items
- });
- this.toggleLoading();
+ }, this.toggleLoading());
})
.fail(err => {
if (err != 0) {
diff --git a/src/lib389/lib389/cli_conf/plugins/posix_winsync.py b/src/lib389/lib389/cli_conf/plugins/posix_winsync.py
index 0512418..d4de7ae 100644
--- a/src/lib389/lib389/cli_conf/plugins/posix_winsync.py
+++ b/src/lib389/lib389/cli_conf/plugins/posix_winsync.py
@@ -41,7 +41,7 @@ def do_fixup(inst, basedn, log, args):
def _add_parser_args(parser):
parser.add_argument('--create-memberof-task', choices=['true', 'false'], type=str.lower,
- help='Sets whether to run the memberOf fix-up task immediately after a sync run in order '
+ help='Sets whether to run the memberUID fix-up task immediately after a sync run in order '
'to update group memberships for synced users (posixWinsyncCreateMemberOfTask)')
parser.add_argument('--lower-case-uid', choices=['true', 'false'], type=str.lower,
help='Sets whether to store (and, if necessary, convert) the UID value in the memberUID '
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[389-ds-base] branch 389-ds-base-1.4.2 updated: Issue 49845 - Remove pkgconfig check for libasan
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mhonek pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new a5a97d6 Issue 49845 - Remove pkgconfig check for libasan
a5a97d6 is described below
commit a5a97d68724bebd05dd25112f27c70beba6c5b9f
Author: Matus Honek <mhonek(a)redhat.com>
AuthorDate: Wed Feb 19 13:47:27 2020 +0100
Issue 49845 - Remove pkgconfig check for libasan
Bug Description:
A recent commit introduced a pkgconfig check for libasan. However, ASAN
buildtime whereabouts are provided within compiler itself, hence there is no
external libasan.pc file, only dynamic linking to libasan is necessary.
Fix Description:
Remove the superfluous check from configure.ac.
Relates https://pagure.io/389-ds-base/issue/49845
Author: Matus Honek <mhonek(a)redhat.com>
Review by: ???
(cherry picked from commit 031c0b9defe7f79f55a9d9761062892daad227b5)
---
configure.ac | 1 -
1 file changed, 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 4d4abe1..982bae8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,7 +140,6 @@ AC_ARG_ENABLE(asan, AS_HELP_STRING([--enable-asan], [Enable gcc/clang address sa
[], [ enable_asan=no ])
AC_MSG_RESULT($enable_asan)
if test "$enable_asan" = yes ; then
- PKG_CHECK_MODULES([ASAN], [libasan])
asan_cflags="-fsanitize=address -fno-omit-frame-pointer -lasan"
asan_rust_defs="-Z sanitizer=address"
else
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[389-ds-base] branch 389-ds-base-1.4.1 updated: Issue 50928 - Unable to create a suffix with countryName
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.1 by this push:
new aa8c123 Issue 50928 - Unable to create a suffix with countryName
aa8c123 is described below
commit aa8c1230708095957a89e460e6f5b6550488c80e
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Tue Mar 3 12:54:55 2020 -0500
Issue 50928 - Unable to create a suffix with countryName
Bug Description: It is not possible to create a suffix using 'c' as
the RDN attribute.
Fix Description: Support 'c' when creating an instance or backend.
Also fixed a few python warnings.
reletes: https://pagure.io/389-ds-base/issue/50928
Reviewed by: firstyear(Thanks!)
---
src/lib389/lib389/cli_conf/backend.py | 18 ++++---
src/lib389/lib389/configurations/sample.py | 75 ++++++++++++++++++++++++------
src/lib389/lib389/idm/country.py | 53 +++++++++++++++++++++
src/lib389/lib389/instance/setup.py | 44 +++++++++++++-----
4 files changed, 155 insertions(+), 35 deletions(-)
diff --git a/src/lib389/lib389/cli_conf/backend.py b/src/lib389/lib389/cli_conf/backend.py
index 10208bd..68e3893 100644
--- a/src/lib389/lib389/cli_conf/backend.py
+++ b/src/lib389/lib389/cli_conf/backend.py
@@ -1,5 +1,5 @@
# --- BEGIN COPYRIGHT BLOCK ---
-# Copyright (C) 2019 Red Hat, Inc.
+# Copyright (C) 2020 Red Hat, Inc.
# Copyright (C) 2019 William Brown <william(a)blackhats.net.au>
# All rights reserved.
#
@@ -13,23 +13,17 @@ from lib389.configurations.sample import (
create_base_org,
create_base_orgunit,
create_base_cn,
+ create_base_c,
)
from lib389.chaining import (ChainingLinks)
-from lib389.index import Index, VLVIndex, VLVSearches
from lib389.monitor import MonitorLDBM
from lib389.replica import Replicas
from lib389.utils import ensure_str, is_a_dn, is_dn_parent
from lib389._constants import *
from lib389.cli_base import (
- populate_attr_arguments,
- _generic_list,
_generic_get,
_generic_get_dn,
- _generic_create,
- _generic_delete,
_get_arg,
- _get_args,
- _get_attributes,
_warn,
)
import json
@@ -181,8 +175,9 @@ def backend_create(inst, basedn, log, args):
be.create(properties=props)
if args.create_suffix and not args.create_entries:
# Set basic ACIs (taken from instance/setup.py)
+ c_aci = '(targetattr="c || description || objectClass")(targetfilter="(objectClass=country)")(version 3.0; acl "Enable anyone c read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
o_aci = '(targetattr="o || description || objectClass")(targetfilter="(objectClass=organization)")(version 3.0; acl "Enable anyone o read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
- dc_aci = '(targetattr="dc || description || objectClass")(targetfilter="(objectClass=domain)")(version 3.0; acl "Enable anyone domain read"; allow (read, search, compare)(userdn="ldap:///anyone");)',
+ dc_aci = '(targetattr="dc || description || objectClass")(targetfilter="(objectClass=domain)")(version 3.0; acl "Enable anyone domain read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
ou_aci = '(targetattr="ou || description || objectClass")(targetfilter="(objectClass=organizationalUnit)")(version 3.0; acl "Enable anyone ou read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
cn_aci = '(targetattr="cn || description || objectClass")(targetfilter="(objectClass=nscontainer)")(version 3.0; acl "Enable anyone cn read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
suffix_rdn_attr = args.suffix.split('=')[0].lower()
@@ -198,6 +193,9 @@ def backend_create(inst, basedn, log, args):
elif suffix_rdn_attr == 'cn':
cn = create_base_cn(inst, args.suffix)
cn.add('aci', cn_aci)
+ elif suffix_rdn_attr == 'c':
+ c = create_base_c(inst, args.suffix)
+ c.add('aci', c_aci)
else:
# Unsupported rdn
raise ValueError("Suffix RDN is not supported for creating suffix object. Only 'dc', 'o', 'ou', and 'cn' are supported.")
@@ -291,7 +289,7 @@ def is_db_link(inst, rdn):
def is_db_replicated(inst, suffix):
replicas = Replicas(inst)
try:
- replica = replicas.get(suffix)
+ replicas.get(suffix)
return True
except:
return False
diff --git a/src/lib389/lib389/configurations/sample.py b/src/lib389/lib389/configurations/sample.py
index f30b8d6..0f6f470 100644
--- a/src/lib389/lib389/configurations/sample.py
+++ b/src/lib389/lib389/configurations/sample.py
@@ -1,5 +1,5 @@
# --- BEGIN COPYRIGHT BLOCK ---
-# Copyright (C) 2017 Red Hat, Inc.
+# Copyright (C) 2020 Red Hat, Inc.
# All rights reserved.
#
# License: GPL (version 3 or any later version).
@@ -12,22 +12,10 @@ from lib389.idm.domain import Domain
from lib389.idm.organization import Organization
from lib389.idm.organizationalunit import OrganizationalUnit
from lib389.idm.nscontainer import nsContainer
+from lib389.idm.country import Country
from lib389.utils import ensure_str
-class sampleentries(object):
- def __init__(self, instance, basedn):
- self._instance = instance
- self._basedn = ensure_str(basedn)
- self.description = None
-
- def apply(self):
- self._apply()
-
- def _apply(self):
- raise Exception('Not implemented')
-
-
def create_base_domain(instance, basedn):
"""Create the base domain object"""
@@ -95,3 +83,62 @@ def create_base_cn(instance, basedn):
})
return cn
+
+def create_base_c(instance, basedn):
+ """Create the base country object"""
+
+ c = Country(instance, dn=basedn)
+ # Explode the dn to get the first bit.
+ avas = dn.str2dn(basedn)
+ c_ava = avas[0][0][1]
+
+ c.create(properties={
+ 'c': c_ava,
+ })
+
+ return c
+
+
+class sampleentries(object):
+ def __init__(self, instance, basedn):
+ self._instance = instance
+ self._basedn = ensure_str(basedn)
+ self.description = None
+ self.version = None
+
+ def apply(self):
+ self._apply()
+
+ def _configure_base(self, add_acis=True):
+ suffix_rdn_attr = self._basedn.split('=')[0].lower()
+ suffix_obj = None
+ if suffix_rdn_attr == 'dc':
+ suffix_obj = create_base_domain(self._instance, self._basedn)
+ aci_vals = ['dc', 'domain']
+ elif suffix_rdn_attr == 'c':
+ suffix_obj = create_base_c(self._instance, self._basedn)
+ aci_vals = ['c', 'country']
+ elif suffix_rdn_attr == 'o':
+ suffix_obj = create_base_org(self._instance, self._basedn)
+ aci_vals = ['o', 'organization']
+ elif suffix_rdn_attr == 'ou':
+ suffix_obj = create_base_orgunit(self._instance, self._basedn)
+ aci_vals = ['ou', 'organizationalunit']
+ elif suffix_rdn_attr == 'cn':
+ suffix_obj = create_base_cn(self._instance, self._basedn)
+ aci_vals = ['cn', 'nscontainer']
+ else:
+ # Unsupported rdn
+ raise ValueError("Suffix RDN '{}' in '{}' is not supported. Supported RDN's are: 'c', 'cn', 'dc', 'o', and 'ou'".format(suffix_rdn_attr, self._basedn))
+
+ if add_acis:
+ suffix_obj.add('aci', [
+ # Allow reading the base domain object
+ '(targetattr="' + aci_vals[0] + ' || description || objectClass")(targetfilter="(objectClass=' + aci_vals[1] + ')")(version 3.0; acl "Enable anyone ' + aci_vals[1] + ' read"; allow (read, search, compare)(userdn="ldap:///anyone");)',
+ # Allow reading the ou
+ '(targetattr="ou || objectClass")(targetfilter="(objectClass=organizationalUnit)")(version 3.0; acl "Enable anyone ou read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
+ ])
+ return suffix_obj
+
+ def _apply(self):
+ raise Exception('Not implemented')
diff --git a/src/lib389/lib389/idm/country.py b/src/lib389/lib389/idm/country.py
new file mode 100644
index 0000000..b0d0e9b
--- /dev/null
+++ b/src/lib389/lib389/idm/country.py
@@ -0,0 +1,53 @@
+# --- BEGIN COPYRIGHT BLOCK ---
+# Copyright (C) 2020 Red Hat, Inc.
+# All rights reserved.
+#
+# License: GPL (version 3 or any later version).
+# See LICENSE for details.
+# --- END COPYRIGHT BLOCK ---
+
+from lib389._mapped_object import DSLdapObject, DSLdapObjects
+
+MUST_ATTRIBUTES = [
+ 'c',
+]
+RDN = 'c'
+
+
+class Country(DSLdapObject):
+ """A single instance of Country entry
+
+ :param instance: An instance
+ :type instance: lib389.DirSrv
+ :param dn: Entry DN
+ :type dn: str
+ """
+
+ def __init__(self, instance, dn=None):
+ super(Country, self).__init__(instance, dn)
+ self._rdn_attribute = RDN
+ self._must_attributes = MUST_ATTRIBUTES
+ self._create_objectclasses = [
+ 'top',
+ 'country',
+ ]
+ self._protected = False
+
+
+class Countries(DSLdapObjects):
+ """DSLdapObjects that represents Country entries
+
+ :param instance: An instance
+ :type instance: lib389.DirSrv
+ :param basedn: Base DN for all group entries below
+ :type basedn: str
+ """
+
+ def __init__(self, instance, basedn):
+ super(Countries, self).__init__(instance)
+ self._objectclasses = [
+ 'country',
+ ]
+ self._filterattrs = [RDN]
+ self._childobject = Country
+ self._basedn = basedn
diff --git a/src/lib389/lib389/instance/setup.py b/src/lib389/lib389/instance/setup.py
index 28e75e4..8217557 100644
--- a/src/lib389/lib389/instance/setup.py
+++ b/src/lib389/lib389/instance/setup.py
@@ -1,5 +1,5 @@
# --- BEGIN COPYRIGHT BLOCK ---
-# Copyright (C) 2019 Red Hat, Inc.
+# Copyright (C) 2020 Red Hat, Inc.
# Copyright (C) 2019 William Brown <william(a)blackhats.net.au>
# All rights reserved.
#
@@ -8,7 +8,6 @@
# --- END COPYRIGHT BLOCK ---
import os
-import logging
import sys
import shutil
import pwd
@@ -24,7 +23,13 @@ from lib389.properties import *
from lib389.passwd import password_hash, password_generate
from lib389.nss_ssl import NssSsl
from lib389.configurations import get_config
-from lib389.configurations.sample import create_base_domain
+from lib389.configurations.sample import (
+ create_base_domain,
+ create_base_org,
+ create_base_orgunit,
+ create_base_cn,
+ create_base_c,
+)
from lib389.instance.options import General2Base, Slapd2Base, Backend2Base
from lib389.paths import Paths
from lib389.saslmap import SaslMappings
@@ -895,14 +900,31 @@ class SetupDs(object):
create_suffix_entry_in_props = backend.pop('create_suffix_entry', False)
ds_instance.backends.create(properties=backend)
if not is_sample_entries_in_props and create_suffix_entry_in_props:
- domain = create_base_domain(ds_instance, backend['nsslapd-suffix'])
- # Set basic ACI
- domain.add('aci', [
- # Allow reading the base domain object
- '(targetattr="dc || description || objectClass")(targetfilter="(objectClass=domain)")(version 3.0; acl "Enable anyone domain read"; allow (read, search, compare)(userdn="ldap:///anyone");)',
- # Allow reading the ou
- '(targetattr="ou || objectClass")(targetfilter="(objectClass=organizationalUnit)")(version 3.0; acl "Enable anyone ou read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
- ])
+ # Set basic ACIs
+ c_aci = '(targetattr="c || description || objectClass")(targetfilter="(objectClass=country)")(version 3.0; acl "Enable anyone c read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
+ o_aci = '(targetattr="o || description || objectClass")(targetfilter="(objectClass=organization)")(version 3.0; acl "Enable anyone o read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
+ dc_aci = '(targetattr="dc || description || objectClass")(targetfilter="(objectClass=domain)")(version 3.0; acl "Enable anyone domain read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
+ ou_aci = '(targetattr="ou || description || objectClass")(targetfilter="(objectClass=organizationalUnit)")(version 3.0; acl "Enable anyone ou read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
+ cn_aci = '(targetattr="cn || description || objectClass")(targetfilter="(objectClass=nscontainer)")(version 3.0; acl "Enable anyone cn read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
+ suffix_rdn_attr = backend['nsslapd-suffix'].split('=')[0].lower()
+ if suffix_rdn_attr == 'dc':
+ domain = create_base_domain(ds_instance, backend['nsslapd-suffix'])
+ domain.add('aci', dc_aci)
+ elif suffix_rdn_attr == 'o':
+ org = create_base_org(ds_instance, backend['nsslapd-suffix'])
+ org.add('aci', o_aci)
+ elif suffix_rdn_attr == 'ou':
+ orgunit = create_base_orgunit(ds_instance, backend['nsslapd-suffix'])
+ orgunit.add('aci', ou_aci)
+ elif suffix_rdn_attr == 'cn':
+ cn = create_base_cn(ds_instance, backend['nsslapd-suffix'])
+ cn.add('aci', cn_aci)
+ elif suffix_rdn_attr == 'c':
+ c = create_base_c(ds_instance, backend['nsslapd-suffix'])
+ c.add('aci', c_aci)
+ else:
+ # Unsupported rdn
+ raise ValueError("Suffix RDN '{}' in '{}' is not supported. Supported RDN's are: 'c', 'cn', 'dc', 'o', and 'ou'".format(suffix_rdn_attr, backend['nsslapd-suffix']))
# Initialise ldapi socket information. IPA expects this ....
ldapi_path = os.path.join(slapd['local_state_dir'], "run/slapd-%s.socket" % slapd['instance_name'])
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[389-ds-base] branch 389-ds-base-1.4.2 updated: Issue 50758 - Only Recommend bash-completion, not Require
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mhonek pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new edddec5 Issue 50758 - Only Recommend bash-completion, not Require
edddec5 is described below
commit edddec50b671ba8c23e1fb5695d891c82ba519c9
Author: Matus Honek <mhonek(a)redhat.com>
AuthorDate: Thu Feb 20 13:52:39 2020 +0100
Issue 50758 - Only Recommend bash-completion, not Require
Bug Description:
bash-completion package is only useful for interactive use. E.g. in case of a
container deployment this is unnecessary.
Fix Description:
Change Requires to Recommends, which allows the dnf/yum ran with
install_weak_deps=False to not install this package; however, this option is by
default True, therefore a regular installation will install the package.
Relates https://pagure.io/389-ds-base/issue/50758
Author: Matus Honek <mhonek(a)redhat.com>
Review by: ???
(cherry picked from commit 6fd09c431c9c4e3f2a9a288daa0ec8d7c820e2c0)
---
rpm/389-ds-base.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in
index a235396..b834119 100644
--- a/rpm/389-ds-base.spec.in
+++ b/rpm/389-ds-base.spec.in
@@ -304,7 +304,7 @@ Requires: python%{python3_pkgversion}-dateutil
Requires: python%{python3_pkgversion}-argcomplete
Requires: python%{python3_pkgversion}-libselinux
Requires: python%{python3_pkgversion}-setuptools
-Requires: bash-completion
+Recommends: bash-completion
%{?python_provide:%python_provide python%{python3_pkgversion}-lib389}
%description -n python%{python3_pkgversion}-lib389
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[389-ds-base] branch 389-ds-base-1.4.1 updated: Issue 50758 - Only Recommend bash-completion, not Require
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mhonek pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.1 by this push:
new 60818c0 Issue 50758 - Only Recommend bash-completion, not Require
60818c0 is described below
commit 60818c06040ffadf924e4b5a20ddebe251286572
Author: Matus Honek <mhonek(a)redhat.com>
AuthorDate: Thu Feb 20 13:52:39 2020 +0100
Issue 50758 - Only Recommend bash-completion, not Require
Bug Description:
bash-completion package is only useful for interactive use. E.g. in case of a
container deployment this is unnecessary.
Fix Description:
Change Requires to Recommends, which allows the dnf/yum ran with
install_weak_deps=False to not install this package; however, this option is by
default True, therefore a regular installation will install the package.
Relates https://pagure.io/389-ds-base/issue/50758
Author: Matus Honek <mhonek(a)redhat.com>
Review by: ???
(cherry picked from commit 6fd09c431c9c4e3f2a9a288daa0ec8d7c820e2c0)
---
rpm/389-ds-base.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in
index 44c2d29..50ddc4a 100644
--- a/rpm/389-ds-base.spec.in
+++ b/rpm/389-ds-base.spec.in
@@ -305,7 +305,7 @@ Requires: python%{python3_pkgversion}-dateutil
Requires: python%{python3_pkgversion}-argcomplete
Requires: python%{python3_pkgversion}-libselinux
Requires: python%{python3_pkgversion}-setuptools
-Requires: bash-completion
+Recommends: bash-completion
%{?python_provide:%python_provide python%{python3_pkgversion}-lib389}
%description -n python%{python3_pkgversion}-lib389
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[389-ds-base] branch 389-ds-base-1.4.2 updated: Issue 50928 - Unable to create a suffix with countryName
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new 5d162fc Issue 50928 - Unable to create a suffix with countryName
5d162fc is described below
commit 5d162fc30c4526b7f07fcc89a8b23d0612974f5e
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Tue Mar 3 12:54:55 2020 -0500
Issue 50928 - Unable to create a suffix with countryName
Bug Description: It is not possible to create a suffix using 'c' as
the RDN attribute.
Fix Description: Support 'c' when creating an instance or backend.
Also fixed a few python warnings.
relates: https://pagure.io/389-ds-base/issue/50928
Reviewed by: firstyear(Thanks!)
---
src/lib389/lib389/cli_conf/backend.py | 18 ++++----
.../lib389/configurations/config_001004002.py | 8 ++--
src/lib389/lib389/configurations/sample.py | 22 ++++++++-
src/lib389/lib389/idm/country.py | 53 ++++++++++++++++++++++
src/lib389/lib389/instance/setup.py | 44 +++++++++++++-----
5 files changed, 117 insertions(+), 28 deletions(-)
diff --git a/src/lib389/lib389/cli_conf/backend.py b/src/lib389/lib389/cli_conf/backend.py
index 10208bd..68e3893 100644
--- a/src/lib389/lib389/cli_conf/backend.py
+++ b/src/lib389/lib389/cli_conf/backend.py
@@ -1,5 +1,5 @@
# --- BEGIN COPYRIGHT BLOCK ---
-# Copyright (C) 2019 Red Hat, Inc.
+# Copyright (C) 2020 Red Hat, Inc.
# Copyright (C) 2019 William Brown <william(a)blackhats.net.au>
# All rights reserved.
#
@@ -13,23 +13,17 @@ from lib389.configurations.sample import (
create_base_org,
create_base_orgunit,
create_base_cn,
+ create_base_c,
)
from lib389.chaining import (ChainingLinks)
-from lib389.index import Index, VLVIndex, VLVSearches
from lib389.monitor import MonitorLDBM
from lib389.replica import Replicas
from lib389.utils import ensure_str, is_a_dn, is_dn_parent
from lib389._constants import *
from lib389.cli_base import (
- populate_attr_arguments,
- _generic_list,
_generic_get,
_generic_get_dn,
- _generic_create,
- _generic_delete,
_get_arg,
- _get_args,
- _get_attributes,
_warn,
)
import json
@@ -181,8 +175,9 @@ def backend_create(inst, basedn, log, args):
be.create(properties=props)
if args.create_suffix and not args.create_entries:
# Set basic ACIs (taken from instance/setup.py)
+ c_aci = '(targetattr="c || description || objectClass")(targetfilter="(objectClass=country)")(version 3.0; acl "Enable anyone c read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
o_aci = '(targetattr="o || description || objectClass")(targetfilter="(objectClass=organization)")(version 3.0; acl "Enable anyone o read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
- dc_aci = '(targetattr="dc || description || objectClass")(targetfilter="(objectClass=domain)")(version 3.0; acl "Enable anyone domain read"; allow (read, search, compare)(userdn="ldap:///anyone");)',
+ dc_aci = '(targetattr="dc || description || objectClass")(targetfilter="(objectClass=domain)")(version 3.0; acl "Enable anyone domain read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
ou_aci = '(targetattr="ou || description || objectClass")(targetfilter="(objectClass=organizationalUnit)")(version 3.0; acl "Enable anyone ou read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
cn_aci = '(targetattr="cn || description || objectClass")(targetfilter="(objectClass=nscontainer)")(version 3.0; acl "Enable anyone cn read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
suffix_rdn_attr = args.suffix.split('=')[0].lower()
@@ -198,6 +193,9 @@ def backend_create(inst, basedn, log, args):
elif suffix_rdn_attr == 'cn':
cn = create_base_cn(inst, args.suffix)
cn.add('aci', cn_aci)
+ elif suffix_rdn_attr == 'c':
+ c = create_base_c(inst, args.suffix)
+ c.add('aci', c_aci)
else:
# Unsupported rdn
raise ValueError("Suffix RDN is not supported for creating suffix object. Only 'dc', 'o', 'ou', and 'cn' are supported.")
@@ -291,7 +289,7 @@ def is_db_link(inst, rdn):
def is_db_replicated(inst, suffix):
replicas = Replicas(inst)
try:
- replica = replicas.get(suffix)
+ replicas.get(suffix)
return True
except:
return False
diff --git a/src/lib389/lib389/configurations/config_001004002.py b/src/lib389/lib389/configurations/config_001004002.py
index ffc1b1d..b57ca2e 100644
--- a/src/lib389/lib389/configurations/config_001004002.py
+++ b/src/lib389/lib389/configurations/config_001004002.py
@@ -1,19 +1,17 @@
# --- BEGIN COPYRIGHT BLOCK ---
-# Copyright (C) 2017 Red Hat, Inc.
+# Copyright (C) 2020 Red Hat, Inc.
# All rights reserved.
#
# License: GPL (version 3 or any later version).
# See LICENSE for details.
# --- END COPYRIGHT BLOCK ---
-from .config import baseconfig, configoperation
+from .config import baseconfig
from .sample import sampleentries
-
from lib389.idm.organizationalunit import OrganizationalUnits
from lib389.idm.group import Groups
from lib389.idm.posixgroup import PosixGroups
from lib389.idm.user import nsUserAccounts
-from lib389.idm.services import ServiceAccounts
from lib389.idm.nscontainer import nsHiddenContainers
@@ -30,7 +28,7 @@ class c001004002_sample_entries(sampleentries):
# Create the 389 service container
# This could also move to be part of core later ....
hidden_containers = nsHiddenContainers(self._instance, self._basedn)
- ns389container = hidden_containers.create(properties={
+ hidden_containers.create(properties={
'cn': '389_ds_system'
})
diff --git a/src/lib389/lib389/configurations/sample.py b/src/lib389/lib389/configurations/sample.py
index 62fb816..0a20f91 100644
--- a/src/lib389/lib389/configurations/sample.py
+++ b/src/lib389/lib389/configurations/sample.py
@@ -1,5 +1,5 @@
# --- BEGIN COPYRIGHT BLOCK ---
-# Copyright (C) 2017 Red Hat, Inc.
+# Copyright (C) 2020 Red Hat, Inc.
# All rights reserved.
#
# License: GPL (version 3 or any later version).
@@ -12,6 +12,7 @@ from lib389.idm.domain import Domain
from lib389.idm.organization import Organization
from lib389.idm.organizationalunit import OrganizationalUnit
from lib389.idm.nscontainer import nsContainer
+from lib389.idm.country import Country
from lib389.utils import ensure_str
@@ -82,6 +83,20 @@ def create_base_cn(instance, basedn):
return cn
+def create_base_c(instance, basedn):
+ """Create the base country object"""
+
+ c = Country(instance, dn=basedn)
+ # Explode the dn to get the first bit.
+ avas = dn.str2dn(basedn)
+ c_ava = avas[0][0][1]
+
+ c.create(properties={
+ 'c': c_ava,
+ })
+
+ return c
+
class sampleentries(object):
def __init__(self, instance, basedn):
@@ -99,6 +114,9 @@ class sampleentries(object):
if suffix_rdn_attr == 'dc':
suffix_obj = create_base_domain(self._instance, self._basedn)
aci_vals = ['dc', 'domain']
+ elif suffix_rdn_attr == 'c':
+ suffix_obj = create_base_c(self._instance, self._basedn)
+ aci_vals = ['c', 'country']
elif suffix_rdn_attr == 'o':
suffix_obj = create_base_org(self._instance, self._basedn)
aci_vals = ['o', 'organization']
@@ -110,7 +128,7 @@ class sampleentries(object):
aci_vals = ['cn', 'nscontainer']
else:
# Unsupported rdn
- raise ValueError("Suffix RDN is not supported for creating sample entries. Only 'dc', 'o', 'ou', and 'cn' are supported.")
+ raise ValueError("Suffix RDN '{}' in '{}' is not supported. Supported RDN's are: 'c', 'cn', 'dc', 'o', and 'ou'".format(suffix_rdn_attr, self._basedn))
if add_acis:
suffix_obj.add('aci', [
diff --git a/src/lib389/lib389/idm/country.py b/src/lib389/lib389/idm/country.py
new file mode 100644
index 0000000..b0d0e9b
--- /dev/null
+++ b/src/lib389/lib389/idm/country.py
@@ -0,0 +1,53 @@
+# --- BEGIN COPYRIGHT BLOCK ---
+# Copyright (C) 2020 Red Hat, Inc.
+# All rights reserved.
+#
+# License: GPL (version 3 or any later version).
+# See LICENSE for details.
+# --- END COPYRIGHT BLOCK ---
+
+from lib389._mapped_object import DSLdapObject, DSLdapObjects
+
+MUST_ATTRIBUTES = [
+ 'c',
+]
+RDN = 'c'
+
+
+class Country(DSLdapObject):
+ """A single instance of Country entry
+
+ :param instance: An instance
+ :type instance: lib389.DirSrv
+ :param dn: Entry DN
+ :type dn: str
+ """
+
+ def __init__(self, instance, dn=None):
+ super(Country, self).__init__(instance, dn)
+ self._rdn_attribute = RDN
+ self._must_attributes = MUST_ATTRIBUTES
+ self._create_objectclasses = [
+ 'top',
+ 'country',
+ ]
+ self._protected = False
+
+
+class Countries(DSLdapObjects):
+ """DSLdapObjects that represents Country entries
+
+ :param instance: An instance
+ :type instance: lib389.DirSrv
+ :param basedn: Base DN for all group entries below
+ :type basedn: str
+ """
+
+ def __init__(self, instance, basedn):
+ super(Countries, self).__init__(instance)
+ self._objectclasses = [
+ 'country',
+ ]
+ self._filterattrs = [RDN]
+ self._childobject = Country
+ self._basedn = basedn
diff --git a/src/lib389/lib389/instance/setup.py b/src/lib389/lib389/instance/setup.py
index 28e75e4..8217557 100644
--- a/src/lib389/lib389/instance/setup.py
+++ b/src/lib389/lib389/instance/setup.py
@@ -1,5 +1,5 @@
# --- BEGIN COPYRIGHT BLOCK ---
-# Copyright (C) 2019 Red Hat, Inc.
+# Copyright (C) 2020 Red Hat, Inc.
# Copyright (C) 2019 William Brown <william(a)blackhats.net.au>
# All rights reserved.
#
@@ -8,7 +8,6 @@
# --- END COPYRIGHT BLOCK ---
import os
-import logging
import sys
import shutil
import pwd
@@ -24,7 +23,13 @@ from lib389.properties import *
from lib389.passwd import password_hash, password_generate
from lib389.nss_ssl import NssSsl
from lib389.configurations import get_config
-from lib389.configurations.sample import create_base_domain
+from lib389.configurations.sample import (
+ create_base_domain,
+ create_base_org,
+ create_base_orgunit,
+ create_base_cn,
+ create_base_c,
+)
from lib389.instance.options import General2Base, Slapd2Base, Backend2Base
from lib389.paths import Paths
from lib389.saslmap import SaslMappings
@@ -895,14 +900,31 @@ class SetupDs(object):
create_suffix_entry_in_props = backend.pop('create_suffix_entry', False)
ds_instance.backends.create(properties=backend)
if not is_sample_entries_in_props and create_suffix_entry_in_props:
- domain = create_base_domain(ds_instance, backend['nsslapd-suffix'])
- # Set basic ACI
- domain.add('aci', [
- # Allow reading the base domain object
- '(targetattr="dc || description || objectClass")(targetfilter="(objectClass=domain)")(version 3.0; acl "Enable anyone domain read"; allow (read, search, compare)(userdn="ldap:///anyone");)',
- # Allow reading the ou
- '(targetattr="ou || objectClass")(targetfilter="(objectClass=organizationalUnit)")(version 3.0; acl "Enable anyone ou read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
- ])
+ # Set basic ACIs
+ c_aci = '(targetattr="c || description || objectClass")(targetfilter="(objectClass=country)")(version 3.0; acl "Enable anyone c read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
+ o_aci = '(targetattr="o || description || objectClass")(targetfilter="(objectClass=organization)")(version 3.0; acl "Enable anyone o read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
+ dc_aci = '(targetattr="dc || description || objectClass")(targetfilter="(objectClass=domain)")(version 3.0; acl "Enable anyone domain read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
+ ou_aci = '(targetattr="ou || description || objectClass")(targetfilter="(objectClass=organizationalUnit)")(version 3.0; acl "Enable anyone ou read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
+ cn_aci = '(targetattr="cn || description || objectClass")(targetfilter="(objectClass=nscontainer)")(version 3.0; acl "Enable anyone cn read"; allow (read, search, compare)(userdn="ldap:///anyone");)'
+ suffix_rdn_attr = backend['nsslapd-suffix'].split('=')[0].lower()
+ if suffix_rdn_attr == 'dc':
+ domain = create_base_domain(ds_instance, backend['nsslapd-suffix'])
+ domain.add('aci', dc_aci)
+ elif suffix_rdn_attr == 'o':
+ org = create_base_org(ds_instance, backend['nsslapd-suffix'])
+ org.add('aci', o_aci)
+ elif suffix_rdn_attr == 'ou':
+ orgunit = create_base_orgunit(ds_instance, backend['nsslapd-suffix'])
+ orgunit.add('aci', ou_aci)
+ elif suffix_rdn_attr == 'cn':
+ cn = create_base_cn(ds_instance, backend['nsslapd-suffix'])
+ cn.add('aci', cn_aci)
+ elif suffix_rdn_attr == 'c':
+ c = create_base_c(ds_instance, backend['nsslapd-suffix'])
+ c.add('aci', c_aci)
+ else:
+ # Unsupported rdn
+ raise ValueError("Suffix RDN '{}' in '{}' is not supported. Supported RDN's are: 'c', 'cn', 'dc', 'o', and 'ou'".format(suffix_rdn_attr, backend['nsslapd-suffix']))
# Initialise ldapi socket information. IPA expects this ....
ldapi_path = os.path.join(slapd['local_state_dir'], "run/slapd-%s.socket" % slapd['instance_name'])
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month
[389-ds-base] branch master updated: Issue 50923 - Fix a test regression
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch master
in repository 389-ds-base.
The following commit(s) were added to refs/heads/master by this push:
new ae29367 Issue 50923 - Fix a test regression
ae29367 is described below
commit ae29367ee908374a42cb072d9ebd6e5d3ce1f4e0
Author: Simon Pichugin <spichugi(a)redhat.com>
AuthorDate: Wed Mar 4 14:41:58 2020 +0100
Issue 50923 - Fix a test regression
Description: Fix a fixture naming issue.
https://pagure.io/389-ds-base/issue/50923
Reviewed by: spichugi (one line commit rule)
---
dirsrvtests/tests/suites/basic/basic_test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dirsrvtests/tests/suites/basic/basic_test.py b/dirsrvtests/tests/suites/basic/basic_test.py
index 2d0e24a..40f95a4 100644
--- a/dirsrvtests/tests/suites/basic/basic_test.py
+++ b/dirsrvtests/tests/suites/basic/basic_test.py
@@ -1375,7 +1375,7 @@ def test_dscreate_ldapi(dscreate_long_instance):
2. Should succeeds
"""
- root_dse = RootDSE(dscreate_ldapi_instance)
+ root_dse = RootDSE(dscreate_long_instance)
log.info(root_dse.get_supported_ctrls())
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 1 month