SF Bug #3373466 - Unable to define force_may attributes
This commit is contained in:
parent
64668e882b
commit
80d027d569
@ -491,8 +491,8 @@ $servers->setValue('server','name','My LDAP Server');
|
||||
server may automatically calculate a default value.
|
||||
In Fedora Directory Server using the DNA Plugin one could ignore uidNumber,
|
||||
gidNumber and sambaSID. */
|
||||
// $servers->setValue('force_may','attrs',array(''));
|
||||
# $servers->setValue('force_may','attrs',array('uidNumber','gidNumber','sambaSID'));
|
||||
// $servers->setValue('server','force_may',array(''));
|
||||
# $servers->setValue('server','force_may',array('uidNumber','gidNumber','sambaSID'));
|
||||
|
||||
/*********************************************
|
||||
* Unique attributes *
|
||||
@ -564,6 +564,6 @@ $servers->setValue('login','timeout',30);
|
||||
$servers->setValue('server','branch_rename',false);
|
||||
$servers->setValue('server','custom_sys_attrs',array('passwordExpirationTime','passwordAllowChangeTime'));
|
||||
$servers->setValue('server','custom_attrs',array('nsRoleDN','nsRole','nsAccountLock'));
|
||||
$servers->setValue('force_may','attrs',array('uidNumber','gidNumber','sambaSID'));
|
||||
$servers->setValue('server','force_may',array('uidNumber','gidNumber','sambaSID'));
|
||||
*/
|
||||
?>
|
||||
|
@ -19,8 +19,6 @@ class ldap extends DS {
|
||||
private $_schema_entries = null;
|
||||
# Schema DN
|
||||
private $_schemaDN = null;
|
||||
# Attributes that should be treated as MAY attributes, even though the scheme has them as MUST attributes.
|
||||
private $force_may = array();
|
||||
|
||||
public function __construct($index) {
|
||||
if (defined('DEBUG_ENABLED') && DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
||||
@ -1912,14 +1910,13 @@ class ldap extends DS {
|
||||
* This function determines if the specified attribute is contained in the force_may list
|
||||
* as configured in config.php.
|
||||
*
|
||||
* @return boolean True if the specified attribute is in the $force_may list and false
|
||||
* otherwise.
|
||||
* @return boolean True if the specified attribute is configured to be force as a may attribute
|
||||
*/
|
||||
function isForceMay($attr_name) {
|
||||
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
||||
debug_log('Entered (%%)',17,0,__FILE__,__LINE__,__METHOD__,$fargs);
|
||||
|
||||
return in_array($attr_name,$this->force_may);
|
||||
return in_array($attr_name,unserialize(strtolower(serialize($this->getValue('server','force_may')))));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -13,9 +13,6 @@
|
||||
* @subpackage DataStore
|
||||
*/
|
||||
class ldap_pla extends ldap {
|
||||
# Attributes that should be treated as MAY attributes, even though the scheme has them as MUST attributes.
|
||||
private $force_may = array();
|
||||
|
||||
function __construct($index) {
|
||||
parent::__construct($index);
|
||||
|
||||
@ -89,6 +86,11 @@ class ldap_pla extends ldap {
|
||||
'*'
|
||||
));
|
||||
|
||||
$this->default->server['force_may'] = array(
|
||||
'desc'=>'Force server MUST attributes as MAY attributes',
|
||||
'default'=>array(
|
||||
));
|
||||
|
||||
# Settings for auto_number
|
||||
$this->default->auto_number['enable'] = array(
|
||||
'desc'=>'Enable the AUTO UID feature',
|
||||
|
Loading…
Reference in New Issue
Block a user