Commit 92502531 authored by bmanager bmanager's avatar bmanager bmanager
Browse files

Merge branch '1.2-fixes' into 'master'

merge 1.2 fixes into master

See merge request fusiondirectory/fd!266
parents e2d13694 384ff14f
# Specify docker image
image: debian:stretch
# Define variable to disable SSL verification of GIT
- lint
- codestyle
- transifex
- tarballs
## Stage lint
# Perl lint
stage: lint
- branches
- apt-get update -qq
- apt-get install -y -qq libarchive-extract-perl libcrypt-cbc-perl libdigest-sha-perl libfile-copy-recursive-perl
- apt-get install -y -qq libnet-ldap-perl libpath-class-perl libterm-readkey-perl libxml-twig-perl
- perl -cW contrib/bin/fusiondirectory-setup contrib/bin/fusiondirectory-insert-schema
# PHP lint (jessie)
image: php:5.6.33-cli-jessie
stage: lint
- branches
- find . -type f -name '*.php' -o -name '*.inc' -print0 | xargs -0 -n1 php -l
# PHP lint (stretch)
image: php:cli-stretch
stage: lint
- branches
- find . -type f -name '*.php' -o -name '*.inc' -print0 | xargs -0 -n1 php -l
## Stage codestyle
# Generate perlcritic rapport
stage: codestyle
- branches
- apt-get update -qq
- apt-get install -y -qq libperl-critic-perl
- cp contrib/bin/fusiondirectory-setup contrib/bin/
- cp contrib/bin/fusiondirectory-insert-schema contrib/bin/
- perlcritic --quiet --verbose "%f~|~%s~|~%l~|~%c~|~%m~|~%e~|~%p~||~%n" contrib/bin
# PHP codesniffer
stage: codestyle
- branches
- apt-get update -qq
- apt-get install -y -qq git php-cli php-codesniffer
- git clone ../dev-tools
- find . -type f -name '*.php' -o -name '*.inc' -exec phpcs --standard=../dev-tools/php-codesniffer-rules/FDStandard/ruleset.xml "{}" \;
# generate man pages to test validity
stage: lint
- branches
- apt-get update -qq
- apt-get install -y -qq perl man-db
- pod2man -c "FusionDirectory Documentation" -r "FusionDirectory 1.3" contrib/bin/fusiondirectory-insert-schema contrib/man/fusiondirectory-insert-schema.1
- pod2man -c "FusionDirectory Documentation" -r "FusionDirectory 1.3" contrib/bin/fusiondirectory-setup contrib/man/fusiondirectory-setup.1
- pod2man -c "FusionDirectory Documentation" -r "FusionDirectory 1.3" contrib/man/fusiondirectory.conf.pod contrib/man/fusiondirectory.conf.5
- lexgrog contrib/man/fusiondirectory-insert-schema.1
- lexgrog contrib/man/fusiondirectory-setup.1
- lexgrog contrib/man/fusiondirectory.conf.5
# fusiondirectory-update-locale
image: php:cli-stretch
stage: transifex
- branches
- apt-get update -qq
- apt-get install -y -qq gettext git
- git clone ../dev-tools
- ../dev-tools/locale-scripts/fusiondirectory-update-locale -g
# Update transifex
image: php:cli-stretch
stage: transifex
- /^1.*$/
- apt-get update -qq
- apt-get install -y -qq gettext git transifex-client
- git clone ../dev-tools
- echo $'[]\nhostname =\nusername = '"$TRANSIFEX_USER"$'\npassword = '"$TRANSIFEX_PASSWORD"$'\ntoken = '"$TRANSIFEX_API_TOKEN"$'\n' > ~/.transifexrc
- tx pull -a -f
- ../dev-tools/locale-scripts/fusiondirectory-update-locale -g
- tx push -f -s -t --skip --no-interactive
stage: tarballs
- tar -cvzf fusiondirectory-core.tar.gz *
- fusiondirectory-core.tar.gz
expire_in: 1h
stage: tarballs
- tags
- tar -cvzf fusiondirectory-core-$(grep '%' | head -n1 | cut -d ' ' -f3 | tr -d '"').tar.gz *
- fusiondirectory-core-$(grep '%' | head -n1 | cut -d ' ' -f3 | tr -d '"').tar.gz
......@@ -2,7 +2,7 @@
host =
type = PO
file_filter = locale/<lang>/fusiondirectory.po
source_file = locale/en/fusiondirectory.po
source_lang = en
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
## Our Standards
Examples of behavior that contributes to creating a positive environment
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at <>. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [][version]
# Contributing to FusionDirectory projects
## Table Of Contents
1. [Welcome](#Welcome)
2. [Code of Conduct](#code-of-conduct)
3. [I just have a question!](#i-just-have-a-question)
4. [How Can I Contribute?](#how-can-i-contribute)
* [Translate FusionDirectory in your language](#translate-fusiondirectory)
* [Finding Wonderful Bugs](#finding-wonderful-bugs)
* [Any Feedback To Enhance Our Apps](#any-feedback-to-enhance-our-apps)
* [Your Awesome And Mighty Codes Contributions](#your-awesome-and-mighty-codes-contributions)
5. [Coding with style](#coding-with-style)
* [Git Commit Messages](#git-commit-messages)
* [PHP Style Guide](#php-style-guide)
6. [Licensing](#licensing)
## Welcome
> «Here's a list of our guidelines, If you want to share a best practice, or think one of these guidelines should be removed, feel free to share it with us.»
:tada: First off, thanks for taking the time to contribute!
Now, sit comfortably at the fireplace, grab your glasses and immerse yourself in our documentation.
## Code Of Conduct
All projects and everyone participating in it is governed by [FusionDirectory Code Of Conduct](./ By participating, you are expected to uphold this code. Please read this before.
## I just have a question!
> **Note:** Please don't file an issue to ask a question. You'll get faster results by using the resource below.
We have an various channel of communications
* [#fusiondirectory, the irc channel of FusionDirectory on freenode](, channel #fusiondirectory
* [FusionDirectory Users mailing list](
* [FusionDirectory dev mailing list](
## How Can I Contribute?
So, you've developed a new cool feature? Fixed an annoying bug? Found a mistake? Want to help translate FusionDirectory in your own language. We'd be happy to hear from you! :+1:
### Translate FusionDirectory
We are using [Transifex]( to translate FusionDirectory.
* Create a transifex account
* Ask to be added to the language group you want to translate
* Start translating
### Register for a FusionDirectory project account
To create a FusionDirectory project Account you must go to
* [FusionDirectory Sign UP](
### Put FusionDirectory in debug mode
* Go into FusionDirectory configuration
* Activate the displaying of PHP errors, and the TRACE debug level
### Finding Wonderful Bugs
>This section guides you through submitting a bug report. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.
When you are creating a bug report, please include as many details as possible. Fill out the **Bugs** template to create issues, the information it asks for helps us resolve issues faster.
Explain the problem and include additional details to help maintainers reproduce the problem:
* **Use a clear and descriptive title** for the issue to identify the problem.
* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining wich brower and it's version. When listing steps, don't just say what you did, but explain how you did it. For example, if you moved the cursor to the end of an input, explain if you used the mouse, or a keyboard.
* **Describe the behavior** you observed after following the steps and point out what exactly is the problem with that behavior.
* **Explain which behavior** you expected to see instead and why.
* **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem. You can use [this tool]( to record GIFs on macOS and Windows, and this tool or [this tool]( on Linux.
* **Include the PHP errors and trace** collected at the debug step above
* **If the problem is linked to a specific LDAP entry** attach its LDAP dump.
Fill in a report on :
* [FusionDirectory]( for the core program
* [FusionDirectory Plugins]( for plugins.
### Any Feedback To Enhance FusionDirectory
>This section guides you through submitting an enhancement suggestion, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions.
When you are creating a enhancement report, please include as many details as possible. Fill out the **Enhancement** template to create thoses issues, the information it asks for helps us resolve issues faster.
* [FusionDirectory]( for the core program
* [FusionDirectory Plugins]( for plugins.
* **Use a clear and descriptive title** for the issue to identify the suggestion.
* **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
* **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
* **Include screenshots and animated GIFs** which help you demonstrate the steps which the suggestion is related to. You can use [this tool]( to record GIFs on macOS and Windows, and [this tool]( or [this tool]( on Linux.
* **Explain why this enhancement would be useful** to most FusionDirectory users.
### Your awesome And Mighty Codes Contributions
>This section guides you through submitting an enhancement suggestion, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions.
When you are contributing a new fonctionnality or plugin, please include as many details as possible.
Fill out the **Contribution** template to create thoses issues, the information it asks for helps us resolve issues faster.
* [FusionDirectory]( for the core program
* [FusionDirectory Plugins]( for plugins.
* **Use a clear and descriptive title** for the issue to identify your contribution
* **Provide a step-by-step description of the contribution** in as many details as possible.
* **Include screenshots and animated GIFs** which help you demonstrate what this contribution is about. You can use [this tool]( to record GIFs on macOS and Windows, and [this tool]( or [this tool]( on Linux.
* **Explain why this contribution would be useful** to most FusionDirectory users.
* **Follow the** [Coding style](
* **Use our** `PHP CodeSniffer <>`_ rules to check code compliance [CodeSniffer](
## Coding with style
### Git Commit Messages
>Having a good guideline for creating commits and sticking to it makes working with Git and collaborating with others a lot easier.
Here are some rules of thumb :
* Use the present tense ("Add feature" not "Added feature")
* If you have a body, separate the subject from the body with a newline
* Limit the subject line to 72 characters
* Do not end the subject line with a period
* Use imperative [mood]( in the subject line
* If the subject is not clear enough, use the body to explain what and why as opposed to how
* Consider starting the commit message with an applicable emoji, when you feel it's an important commit :
* :tada: When first / initial commit
* :sparkles: When introducing new features
* :ambulance: When fixing a bug
* :handshake: When merging files
* :tractor: When you changing file structure or refactoring
* :books: When writing docs
* :gem: When new Release
* :lipstick: For cosmetics purposes
#### Commit Message Format
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**:
<emoji> <type>(<scope>): <subject>
The **header** is mandatory and the **scope** of the header is optional.
Where type can be :
* **feat**: A new feature
* **fix**: A bug fix
* **core**: Code for the Core
* **docs**: Documenting the code or writing new documentation
* **style**: Cosmetics purpose
* **test**: Adding missing or correcting tests
:sparkles: feat(supann): Make supannRefId multivaluated
supannRefId on Structure object is too small and mono valued
close #5685
### PHP style Guide
To be sure to respect our guidelines, read [Coding standards](
## Licensing
For all new projects and most of older one we use **GPL2+ License**. You can find it [here](../
Make sure to use resources that we have the rights to use. Copyrighted images and videos may cause legal problems.
This document is strongly inspired by the following resources: [ovh-ux-guidelines
](, [project-guidelines](, [Atom Guidelines](, [Angularjs guidelines](
With love :heart:
## %"FusionDirectory 1.2.1" - 2018-05-09
### Added
#### fusiondirectory-plugins
- fd-plugins#5548 Sort entries in ppolicy dashboard
#### fusiondirectory
- fd#5342 SimplePlugin should have a way to say a tab cannot be created for some reason
- fd#5694 Cannot add a group to "users and groups" field in sudo role
- fd#5703 Sort entries in users dashboard
- fd#5746 Using date modifier does not work for unix password expiration
### Changed
#### fusiondirectory-plugins
- fd-plugins#5685 supannRefId on Structure object is too small and mono valued
- fd-plugins#5688 Backport the DNS code from 1.3-dev for speed and usability reason
- fd-plugins#5713 Phones have wrong attribute order
- fd-plugins#5716 DNS Zone edition is too slow
- fd-plugins#5740 Dashboard tabs are in random order
#### fusiondirectory
- fd#5668 Password length on login page should have no limit
- fd#5692 Update the with correct forge information
- fd#5732 Listing objects should check ACL on attributes
- fd#5737 Dashboard tabs should be ordered
- fd#5808 multibyte functions should be used to truncate strings
### Fixed
#### fusiondirectory-plugins
- fd-plugins#4036 Webservice does not display ACL errors in some cases
- fd-plugins#4348 Fusion inventory should return an error if schema is missing
- fd-plugins#5629 Error message when removing some content from partage tab
- fd-plugins#5672 Mail plugin incompatible with PHP 7.1
- fd-plugins#5673 PHP error on login page when applications plugin is installed and applications in menu set to only allowed
- fd-plugins#5704 [webservice] User with admin ACL on department can ls objects at root base in WS
- fd-plugins#5707 posixAccount foreignKey is wrong
- fd-plugins#5708 software list and profile management error when using several OPSI Servers
- fd-plugins#5709 DNS Tab - record filtering is broken for new systems
- fd-plugins#5724 SOA serial is rewriten to each reverse even if no modification is made to any record related to these domains
- fd-plugins#5725 Crash when I remove IP from a workstation with a DNS record
- fd-plugins#5729 SOA is not updated in reverse zones if there is no record change
- fd-plugins#5745 PHP error in OPSI product properties
- fd-plugins#5747 Line number in CSV import error messages is incorrect
- fd-plugins#5754 Forward confirmation to manager does not work when extending the account expiration
- fd-plugins#5755 User reminder does not support accents in the message
- fd-plugins#5757 DHCP: Changing mac address in the system's system tab does not update the DHCP entries accordingly
- fd-plugins#5766 Crash when DHCP plugin is not installed when we use OPSI import
- fd-plugins#5768 Renaming DNS zones often results in an Exception being thrown
- fd-plugins#5796 Webservice does not return JSON encode error
- fd-plugins#5798 API returns no error when asking for non existing tab using method getfields()
- fd-plugins#5799 Calling getfields for 'supannAccount' triggers JSON encoding error
- fd-plugins#5813 When we try to put an Google+ id in the personal plugin we get a crash
- fd-plugins#5815 Audit plugin crashes when the author dn is not found in the LDAP
#### fusiondirectory
- fd#5348 LDIF import should support folded comments
- fd#5588 fusiondirectory-setup custom smarty directory forced to lowercase
- fd#5589 SASL missing from Password default hash field in setup wizard
- fd#5701 Management filter is broken when mainAttr is FALSE
- fd#5696 If tab objectClass contains top, tab gets activated by default
- fd#5700 Non-existing classes in pluglist::$info
- fd#5705 Correct contributing remove part about using the templates link
- fd#5707 core-fd.schema still has gosa in description of attributes
- fd#5711 ACL list have a PHP error when there are ACL on objects
- fd#5712 Error text is wrong is some cases
- fd#5724 Error before login on Centos 7
- fd#5726 Log to fd behind an lemonldap::ng portal show debug log instead of main page
- fd#5736 Display Attribute should not be interpreted by smarty
- fd#5741 Foreign keys are broken on ogroups dynamic tabs
- fd#5749 Webservice errors
- fd#5758 Error when renaming a object with single-value main attribute
- fd#5757 In case of LDAP errors during a deletion, a PHP error is triggered
- fd#5759 Unclear "Invalid objectType" errors
- fd#5795 Activating audit for action 'security' causes error at login
- fd#5796 gosaGroupObjects field is incorrect after a member is being moved
- fd#5800 Unclear LDAP errors when DN creation fails
- fd#5807 Attributes should refuse invalid values
### Security
#### fusiondirectory
- fd#5790 Locking fails with multiple SSH Keys
- fd#5794 ACL restrictions not applied when accessing through the JSONRPC API.
## %"FusionDirectory 1.2" - 2017-07-02
### Added
#### fusiondirectory
- fusiondirectory#5581 File renater-partage/admin/groups/renater-partage/ was added
#### fusiondirectory
- fd#5532 We should be able to put groups in groups
- fd#5587 ACL - System templates
- fd#5602 Add array modifiers
#### fusiondirectory-plugins
- fd-plugins#5504 We should be able to launch actions on group of systems
- fd-plugins#5529 Add "Partage" capabilities with SYMPA
- fd-plugins#5534 Add "Partage" capabilities with group
- fd-plugins#5582 Import groups using csv
- fd-plugins#5595 Grab the version of the opsi package in a software-list
### Changed
#### fusiondirectory
- fusiondirectory#5580 was renamed as
- fusiondirectory#5640 file ldapmanager/addons/ldapmanager/contentcsv.tpl has been removed
#### fusiondirectory
- fd#5545 Unicity is only tested upon the same objectType
- fd#5574 Groups RDN configuration is confusing
#### fusiondirectory-plugins
- fd-plugins#5315 mail methods code should be reviewed and cleaned
- fd-plugins#5341 DHCP tab should be able to load values from template
- fd-plugins#5573 Unicity is only tested upon the same objectType
- fd-plugins#5585 System templates - DNS Tab
### Fixed
#### fusiondirectory
- fd#2586 class_plugin should be reviewed
- fd#4236 FD and IPv6
- fd#5297 User tab / description as text area
- fd#5347 Template types needs their own icon somehow
- fd#5395 Import groups using csv
- fd#5542 Icon for waiting task is not showing
- fd#5568 I have always the browser language, same if I specify another language in FusionDirectory configuration
- fd#5593 Script for hook 'user postmodify' is not executed when password hash=sasl and only the password is changed.
#### fusiondirectory-plugins
- fd-plugins#5340 DHCP postLdapSave should lock the object modified
- fd-plugins#5506 Check that OPSI is fully working on groups
- fd-plugins#5512 Remove DNS tab or machine not remove the record associated
- fd-plugins#5519 template of workstations trigger the creation with the OPSI webservice
- fd-plugins#5520 Schedule action start directly
- fd-plugins#5540 Errors when trying to schedule actions
- fd-plugins#5547 Wrong expiration date shown in ppolicy dashboard
- fd-plugins#5556 %askme% dans les champs date
- fd-plugins#5560 The DNS plugin fails to find the primary server, if it's in another zone
- fd-plugins#5572 Samba home path fields are weirdly checked
- fd-plugins#5636 Slave ldap2zone config should enforce final dot in zone name
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
......@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
......@@ -56,7 +56,6 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
......@@ -112,7 +111,6 @@ above, provided that you also meet all of these conditions:
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
......@@ -171,7 +169,6 @@ access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
......@@ -229,7 +226,6 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C) 2017 fusiondirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.