Commit 4854b67c authored by bmortier's avatar bmortier

Merge branch '1.0.11-fixes'

parents b3a0de19 1a5417d2
......@@ -177,3 +177,7 @@ documentation and additional help.
* Tobias Göbel
Fixes for PHP7 compatibility
* Christian Kreidl <christian.kreidl@ziti.uni-heidelberg.de>
ppolicy improvement
FusionDirectory changelog
=========================
* FusionDirectory 1.0.12
Bugs #4645: Could not add groups to user templates
FusionDirectory plugins - Bugs #4658: csv import with empty field
Bugs #4678: group : member objects list
FusionDirectory plugins - Bugs #4689: we should be able to create mail address without having a server and a service referenced
FusionDirectory plugins - Bugs #4692: remove the antivirus service
FusionDirectory plugins - Bugs #4699: move postfix service in his own plugin
FusionDirectory plugins - Bugs #4706: move the spamassasin service to his own plugin
Bugs #4713: remove the antivirus service icons
FusionDirectory plugins - Bugs #4714: leftover in services-fd.schema of the removal of the asterisk plugin
FusionDirectory plugins - Bugs #4721: move the spam options for the mail user tab to a spamassasin user tab
Bugs #4735: nginx + php-fpm with fusiondirectory
Bugs #4737: we should remove data['SERVERS']['IMAP'] from config
FusionDirectory plugins - Bugs #4739: remove the option Use custom sieve script (disables all Mail options!)
FusionDirectory plugins - Bugs #4740: in the cyrus service the hostname, port should be mandatory
FusionDirectory plugins - Bugs #4741: in the dovecot service the hostname, port should be mandatory
FusionDirectory plugins - Bugs #4742: ppolicy: description cannot be set
Bugs #4746: Error when saving user if objectClass person is missing.
Bugs #4754: user template : %r|% does not work in password
Bugs #4756: Update documentation with fixes/dev repos info.
Wishlist #4687: ACL assignments can’t give rights to groups.
Wishlist #4722: Use Nginx instead of Apache2
Wishlist #4738: extend the search query to email
FusionDirectory plugins - Wishlist #4743: ppolicy: user interface improvements
Wishlist #4755: user template: password should show only one field
* FusionDirectory 1.0.11
|Fix] FusionDirectory plugins - Bugs #4391: Choices order seems random in shell
......
This diff is collapsed.
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "FUSIONDIRECTORY-INSERT-SCHEMA 1"
.TH FUSIONDIRECTORY-INSERT-SCHEMA 1 "2016-02-10" "FusionDirectory 1.0.10" "FusionDirectory Documentation"
.TH FUSIONDIRECTORY-INSERT-SCHEMA 1 "2016-03-02" "FusionDirectory 1.0.12" "FusionDirectory Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "FUSIONDIRECTORY-SETUP 1"
.TH FUSIONDIRECTORY-SETUP 1 "2016-02-19" "FusionDirectory 1.0.10" "FusionDirectory Documentation"
.TH FUSIONDIRECTORY-SETUP 1 "2016-04-06" "FusionDirectory 1.0.12" "FusionDirectory Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......@@ -162,6 +162,9 @@ This option perform a check on FusionDirectory's config file.
.IP "\-\-check\-ldap" 4
.IX Item "--check-ldap"
This option check your \s-1LDAP\s0 tree. Looking for admin account, and groups or people branch. If one of those don't exists, the script will ask you what to do.
.IP "\-\-check\-ids" 4
.IX Item "--check-ids"
This option check your \s-1LDAP\s0 tree for duplicated uidNumber or gidNumber among users and groups.
.IP "\-\-migrate\-users" 4
.IX Item "--migrate-users"
This option add FusionDirectory attributes to the people branch.
......
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "FUSIONDIRECTORY.CONF 1"
.TH FUSIONDIRECTORY.CONF 1 "2016-02-10" "FusionDirectory 1.0.10" "FusionDirectory Documentation"
.TH FUSIONDIRECTORY.CONF 1 "2016-03-02" "FusionDirectory 1.0.12" "FusionDirectory Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -470,22 +470,7 @@ class config {
return;
}
/* Fill imap servers */
$ldap = $this->get_ldap_link();
$ldap->cd ($this->current['BASE']);
/* Search mailMethod configuration in main section too */
$this->current['MAILMETHOD'] = $this->get_cfg_value("mailMethod", "");
$mailMethodClass = 'mailMethod'.$this->current['MAILMETHOD'];
if (class_available($mailMethodClass)) {
$this->data['SERVERS']['IMAP'] = $mailMethodClass::get_server_list($this);
} elseif (class_available('mailMethod')) {
msg_dialog::display(
_('Error'),
sprintf(_('The selected mail method (class %s) is not available'), $mailMethodClass),
ERROR_DIALOG
);
}
/* Get NFS server lists */
$tmp = array("default");
......
......@@ -703,7 +703,7 @@ class plugin
$length = $args[0];
}
$res = '';
for ($i = 0; $i < $args[0]; ++$i) {
for ($i = 0; $i < $length; ++$i) {
switch ($chars) {
case 'l':
$res .= (string)rand(0, 9);
......
......@@ -175,7 +175,7 @@ class session {
*/
public static function global_delete($name)
{
if ($_SESSION[$name]) {
if (isset($_SESSION[$name])) {
unset($_SESSION[$name]);
}
}
......
......@@ -107,6 +107,12 @@ class userinfo
$ldap->cd($this->config->current['BASE']);
/* Get member groups... */
$ldap->search('(&(objectClass=groupOfNames)(member='.ldap_escape_f($this->dn).'))', array('dn'));
while ($attrs = $ldap->fetch()) {
$this->groups[$attrs['dn']] = $attrs['dn'];
}
/* Get member POSIX groups... */
$ldap->search('(&(objectClass=posixGroup)(memberUid='.ldap_escape_f($this->uid).'))', array('dn'));
while ($attrs = $ldap->fetch()) {
$this->groups[$attrs['dn']] = $attrs['dn'];
......@@ -202,7 +208,7 @@ class userinfo
}
}
/* Create an array which represenet all relevant permissions settings
/* Create an array which represent all relevant permissions settings
per dn.
The array will look like this:
......
......@@ -26,6 +26,6 @@ class userGroupSelect extends userSelect
class userGroupRoleSelect extends userGroupSelect
{
protected $objectTypes = array('user', 'group', 'role');
protected $objectTypes = array('user', 'group', 'role', 'ogroup');
}
?>
......@@ -1976,6 +1976,7 @@ class SetAttribute extends Attribute
protected $valueUnicity = TRUE;
protected $editingValue = FALSE;
protected $linearRendering = TRUE;
protected $size = 4;
/*! \brief The constructor of SetAttribute
*
......@@ -2108,10 +2109,13 @@ class SetAttribute extends Attribute
function renderOnlyFormInput()
{
if (($this->size < 15) && ($this->size < count($this->value))) {
$this->size = min(15, count($this->value));
}
$id = $this->getHtmlId();
$smarty = get_smarty();
$smarty->assign($id.'_values', $this->getDisplayValues());
$display = '<select multiple="multiple" name="row'.$id.'[]" id="row'.$id.'"'.
$display = '<select multiple="multiple" name="row'.$id.'[]" id="row'.$id.'" size="'.$this->size.'"'.
($this->disabled? ' disabled="disabled"':'').
' >'."\n";
$display .= '{html_options options=$'.$id.'_values}';
......@@ -2259,6 +2263,11 @@ class SetAttribute extends Attribute
{
return in_array($value, $this->value);
}
function setSize($size)
{
$this->size = $size;
}
}
/*! \brief This class allow to handle easily a composite attribute
......
......@@ -412,9 +412,11 @@ class UsersGroupsAttribute extends GenericDialogAttribute
if ($this->display_attr == 'dn') {
$this->displays[$i] = $attrs['dn'];
} elseif (in_array('posixGroup', $attrs['objectClass'])) {
$this->displays[$i] = sprintf(_('Group %s'), trim($attrs['cn'][0]));
$this->displays[$i] = sprintf(_('POSIX group %s'), trim($attrs['cn'][0]));
} elseif (in_array('organizationalRole', $attrs['objectClass'])) {
$this->displays[$i] = sprintf(_('Role %s'), trim($attrs['cn'][0]));
} elseif (in_array('groupOfNames', $attrs['objectClass'])) {
$this->displays[$i] = sprintf(_('Group %s'), trim($attrs['cn'][0]));
} elseif (isset($attrs['uid'][0])) {
$this->displays[$i] = trim($attrs['uid'][0]);
} else {
......
......@@ -63,7 +63,7 @@ define("FPDF_FONTPATH", "/usr/share/php/fpdf/font/"); /*! Define fpdf font path
/*!
* \brief FusionDirectory Version
*/
define ("FD_VERSION", "1.0.11"); /*! Define FusionDirectory version */
define ("FD_VERSION", "1.0.12"); /*! Define FusionDirectory version */
/*!
* \brief FusionDirectory config object RDN
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: FusionDirectory VERSION\n"
"Report-Msgid-Bugs-To: bugs@fusiondirectory.org\n"
"POT-Creation-Date: 2016-04-06 11:27+0200\n"
"POT-Creation-Date: 2016-04-19 14:14+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FusionDirectory project <contact@fusiondirectory.org>\n"
"Language-Team: English\n"
......@@ -280,8 +280,8 @@ msgstr ""
#: plugins/admin/departments/dep-list.xml:79
#: plugins/admin/users/user-list.xml:105
#: plugins/admin/aclrole/class_aclEditionDialog.inc:192
#: include/simpleplugin/class_dialogAttributes.inc:632
#: include/simpleplugin/class_dialogAttributes.inc:633
#: include/simpleplugin/class_dialogAttributes.inc:634
#: include/simpleplugin/class_dialogAttributes.inc:635
#: include/simpleplugin/class_attribute.inc:2676
#: include/simpleplugin/class_attribute.inc:2677
#: include/simpleplugin/simple-list.xml:67
......@@ -294,8 +294,8 @@ msgstr ""
#: plugins/admin/departments/dep-list.xml:67
#: plugins/admin/departments/dep-list.xml:88
#: plugins/admin/users/user-list.xml:112
#: include/simpleplugin/class_dialogAttributes.inc:642
#: include/simpleplugin/class_dialogAttributes.inc:643
#: include/simpleplugin/class_dialogAttributes.inc:644
#: include/simpleplugin/class_dialogAttributes.inc:645
#: include/simpleplugin/simple-list.xml:75
#: include/simpleplugin/simple-list.xml:125
msgid "Remove"
......@@ -2152,16 +2152,16 @@ msgid "Select all"
msgstr ""
#: include/class_listing.inc:537 include/class_management.inc:681
#: include/class_config.inc:373 include/class_config.inc:484
#: include/class_msgPool.inc:215 include/class_msgPool.inc:235
#: include/class_msgPool.inc:265 include/class_msgPool.inc:682
#: include/class_msgPool.inc:713 include/class_msgPool.inc:740
#: include/functions.inc:3107 include/functions.inc:3128
#: include/functions.inc:3168 include/functions.inc:3180
#: include/functions.inc:3184 include/functions.inc:3191
#: include/functions.inc:3200 include/functions.inc:3262
#: include/class_msg_dialog.inc:128 include/class_xml.inc:58
#: include/class_plugin.inc:1510 include/class_CopyPasteHandler.inc:278
#: include/class_config.inc:373 include/class_msgPool.inc:215
#: include/class_msgPool.inc:235 include/class_msgPool.inc:265
#: include/class_msgPool.inc:682 include/class_msgPool.inc:713
#: include/class_msgPool.inc:740 include/functions.inc:3107
#: include/functions.inc:3128 include/functions.inc:3168
#: include/functions.inc:3180 include/functions.inc:3184
#: include/functions.inc:3191 include/functions.inc:3200
#: include/functions.inc:3262 include/class_msg_dialog.inc:128
#: include/class_xml.inc:58 include/class_plugin.inc:1510
#: include/class_CopyPasteHandler.inc:278
#: include/simpleplugin/class_attribute.inc:1540
#: include/simpleplugin/class_attribute.inc:1543
#: include/simpleplugin/class_attribute.inc:1546
......@@ -2293,7 +2293,7 @@ msgid "XML error in fusiondirectory.conf: %s at line %d"
msgstr ""
#: include/class_config.inc:162 include/class_config.inc:300
#: include/class_config.inc:915 include/class_config.inc:928
#: include/class_config.inc:900 include/class_config.inc:913
#: include/functions.inc:663 include/class_timezone.inc:51
#: include/password-methods/class_password-methods-sha.inc:71
#: include/password-methods/class_password-methods-ssha.inc:75
......@@ -2336,30 +2336,25 @@ msgstr ""
msgid "Location \"%s\" could not be found in the configuration file"
msgstr ""
#: include/class_config.inc:485
#, php-format
msgid "The selected mail method (class %s) is not available"
msgstr ""
#: include/class_config.inc:916
#: include/class_config.inc:901
#, php-format
msgid ""
"The snapshot functionality is enabled, but the required variable '%s' is not "
"set."
msgstr ""
#: include/class_config.inc:929
#: include/class_config.inc:914
#, php-format
msgid ""
"The snapshot functionality is enabled, but the required compression module "
"is missing. Please install '%s'."
msgstr ""
#: include/class_config.inc:1034
#: include/class_config.inc:1019
msgid "All categories"
msgstr ""
#: include/class_config.inc:1161
#: include/class_config.inc:1146
msgid "My account"
msgstr ""
......@@ -3476,7 +3471,7 @@ msgstr ""
#: include/simpleplugin/class_dialogAttributes.inc:415
#, php-format
msgid "Group %s"
msgid "POSIX group %s"
msgstr ""
#: include/simpleplugin/class_dialogAttributes.inc:417
......@@ -3484,17 +3479,22 @@ msgstr ""
msgid "Role %s"
msgstr ""
#: include/simpleplugin/class_dialogAttributes.inc:452
#: include/simpleplugin/class_dialogAttributes.inc:419
#, php-format
msgid "Group %s"
msgstr ""
#: include/simpleplugin/class_dialogAttributes.inc:454
msgid "Group of user"
msgstr ""
#: include/simpleplugin/class_dialogAttributes.inc:621
#: include/simpleplugin/class_dialogAttributes.inc:623
#: include/simpleplugin/class_attribute.inc:1090
#: include/simpleplugin/class_attribute.inc:1124
msgid "None"
msgstr ""
#: include/simpleplugin/class_dialogAttributes.inc:623
#: include/simpleplugin/class_dialogAttributes.inc:625
msgid "Unknown"
msgstr ""
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -42,10 +42,14 @@ class ObjectsAttribute extends GenericDialogAttribute
$infos = objects::infos($objectType);
$this->types[$i] = $code;
$this->displays[$i] = $attrs[$infos['nameAttr']][0];
if (isset($attrs['description'][0])) {
if ($objectType == 'user') {
if (isset($attrs['description'][0])) {
$this->displays[$i] .= ' ['.$attrs['uid'][0].' - '.$attrs['description'][0].']';
} else {
$this->displays[$i] .= ' ['.$attrs['uid'][0].']';
}
} elseif (isset($attrs['description'][0])) {
$this->displays[$i] .= ' ['.$attrs['description'][0].']';
} elseif (isset($attrs['uid'][0])) {
$this->displays[$i] .= ' ['.$attrs['uid'][0].']';
}
break;
}
......
......@@ -19,6 +19,7 @@
<attribute>uid</attribute>
<attribute>userPassword</attribute>
<attribute>fdTemplateField</attribute>
<attribute>mail</attribute>
</query>
<scope>auto</scope>
</search>
......@@ -30,11 +31,11 @@
<maxlength>60</maxlength>
<default></default>
<unset></unset>
<set>(|(cn=*$*)(sn=*$*)(givenName=*$*)(uid=*$*))</set>
<set>(|(cn=*$*)(sn=*$*)(givenName=*$*)(uid=*$*)(mail=*$*))</set>
<alphabet>true</alphabet>
<autocomplete>
<backend>LDAP</backend>
<filter>(&amp;(objectClass=inetOrgPerson)(|(cn=*$NAME*)(sn=*$NAME*)(givenName=*$NAME*)(uid=*$NAME*)))</filter>
<filter>(&amp;(objectClass=inetOrgPerson)(|(cn=*$NAME*)(sn=*$NAME*)(givenName=*$NAME*)(uid=*$NAME*)(mail=*$NAME*)))</filter>
<attribute>cn</attribute>
<attribute>uid</attribute>
<frequency>0.5</frequency>
......
......@@ -91,6 +91,10 @@ class UserPasswordAttribute extends CompositeAttribute
parent::renderAttribute($attributes, $readOnly);
} else {
foreach ($this->attributes as $key => &$attribute) {
if (is_object($this->plugin) && $this->plugin->is_template && ($key == 2)) {
/* Do not display confirmation field in template mode */
continue;
}
if (($key == 0) && ($config->get_cfg_value('forcePasswordDefaultHash', 'FALSE') == 'TRUE')) {
$attribute->setDisabled(TRUE);
} else {
......@@ -454,6 +458,12 @@ class user extends simplePlugin
$this->was_locked = $this->attributesAccess['userPassword']->isLocked();
}
function is_this_account($attrs)
{
/* Only inetOrgPerson is needed, it has the two others as SUP classes */
return (isset($attrs['objectClass']) && in_array_ics('inetOrgPerson', $attrs['objectClass']));
}
function postCopyHook()
{
$this->attributesAccess['uid']->setDisabled($this->initially_was_account && !$this->is_template);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment