mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
ad35601bf2
58
doc/README.Ldap
Normal file
58
doc/README.Ldap
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
Ldap configuration
|
||||||
|
===================
|
||||||
|
|
||||||
|
The configuration for authentication against an ldap server needs to be done
|
||||||
|
the settings.xml file using a text editor. It cannot be edited from within the
|
||||||
|
web gui.
|
||||||
|
|
||||||
|
SeedDMS supports ldap authentication using an Active Directory (AD) or a
|
||||||
|
regular ldap server, e.g. openldap
|
||||||
|
|
||||||
|
The location of the ldap server is specified in two parameters: 'host' and
|
||||||
|
'port'. 'host' can be either a plain hostname or an ldap URI, including the
|
||||||
|
protocol, the host and optionally the port, e.g. ldap://localhost:389. In case
|
||||||
|
of an URI the port in the configuration must remain empty.
|
||||||
|
|
||||||
|
The authentication itself is a two step process which differs, depending on how
|
||||||
|
to bind to the server. If the configuration sets 'bindDN' and 'bindPW', those
|
||||||
|
values will be used for a initial non anonymous bind to the ldap server
|
||||||
|
otherwise an anonymous bind is executed.
|
||||||
|
|
||||||
|
After the initial bind, a ldap search for either 'uid=<username>' (ldap) or
|
||||||
|
'sAMAccountName=<username>' (AD) below basedn is done. The purpose of this
|
||||||
|
search is to retrieve a working bindDN which is then used to actually
|
||||||
|
authenticate the user. In case of an anonymous first bind the search will
|
||||||
|
likely fail and the bindDN for the second bind will be either
|
||||||
|
'uid=<username>,<basedn>' (ldap) or '<username>@<accountDomainName>' (AD). If
|
||||||
|
the search succeeds the bindDN will be taken from the user's data in the ldap
|
||||||
|
server. This bindDN will be used for a second bind using the users password.
|
||||||
|
If the second bind succeeds the user could be successfully authenticated.
|
||||||
|
|
||||||
|
The data from the ldap server can be used to create an account in SeedDMS
|
||||||
|
if the user trying to login does not exist yet, but was able to authenticate.
|
||||||
|
This will only be done if 'authentication->restricted' in the configuration
|
||||||
|
is set to true. In that case the common name (cn) and email address is taken
|
||||||
|
from ldap. Existing accounts in SeedDMS will not be updated with data from
|
||||||
|
ldap.
|
||||||
|
|
||||||
|
Examples
|
||||||
|
---------
|
||||||
|
|
||||||
|
Anonymous bind to openldap on localhost, port 389
|
||||||
|
- type = "ldap"
|
||||||
|
- baseDN = "ou=users,dc=mycompany,dc=de"
|
||||||
|
- host = "ldap://localhost"
|
||||||
|
|
||||||
|
During authentication as user 'admin' the following steps are executed
|
||||||
|
|
||||||
|
1. connect to ldap server at localhost:389
|
||||||
|
2. do an anonymous bind
|
||||||
|
3. search for 'uid=admin' below basedn
|
||||||
|
4.1. if search succeeds use the dn from the user
|
||||||
|
4.2. if search fails use 'uid=admin,<basedn>' as dn
|
||||||
|
5. do a non anonymous bind with dn and password entered by user
|
||||||
|
6. if step 5. succeeds the use is authenticated
|
||||||
|
|
||||||
|
If bindDN and bindPW are specified in the configuration, the second step
|
||||||
|
will be a non anonymous bind.
|
||||||
|
|
30
doc/README.Mail
Normal file
30
doc/README.Mail
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
Mail configuration
|
||||||
|
===================
|
||||||
|
|
||||||
|
SeedDMS uses email to
|
||||||
|
|
||||||
|
* notify users about changes of documents and folders
|
||||||
|
* send instructions during the password forgotten process
|
||||||
|
|
||||||
|
Configuring email in SeedDMS is simple on systems running a
|
||||||
|
local mail server, because this is the default in SeedDMS and
|
||||||
|
no additional configuration is needed. On Linux you should
|
||||||
|
consider running a local mail server, which relais the mails
|
||||||
|
to your outgoing mail server. If you cannot run a local mail
|
||||||
|
server, you can still configure SeedDMS to use an outgoing
|
||||||
|
SMTP server. Below are some examples on how to configure
|
||||||
|
SeedDMS for different hosters.
|
||||||
|
|
||||||
|
1&1
|
||||||
|
---------
|
||||||
|
|
||||||
|
smtp server: ssl://smtp.1und1.de
|
||||||
|
smtp port: 465
|
||||||
|
|
||||||
|
Gmail
|
||||||
|
---------
|
||||||
|
smtp server: smtp.gmail.com
|
||||||
|
smtp port: 587
|
||||||
|
note: you have to turn on 'Less secure app access' in your google account,
|
||||||
|
otherwise you will not be able to send mail. It will quit with an error
|
||||||
|
complaining about wrong credentials
|
59
doc/README.ocr
Normal file
59
doc/README.ocr
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
OCR
|
||||||
|
====
|
||||||
|
|
||||||
|
SeedDMS itself has no support for optical character recognition (OCR)
|
||||||
|
because it does not care about the content of file. Though, external
|
||||||
|
OCR software can be used to convert an image into text and index it
|
||||||
|
by the full text search engine.
|
||||||
|
|
||||||
|
The following script can be use to convert a scanned image into pdf
|
||||||
|
with a text layer added. The script actually takes this file to
|
||||||
|
ran it through pdftotext. It was published in the seeddms forum
|
||||||
|
https://sourceforge.net/p/seeddms/discussion/general/thread/4ec5973d/
|
||||||
|
|
||||||
|
|
||||||
|
#!/bin/bash
|
||||||
|
inputpdf=$1
|
||||||
|
temp_folder=/tmp/seedinput/$(date +"%Y_%m_%d_%H%M%S")/
|
||||||
|
lockfile=/tmp/seed
|
||||||
|
protokolldatei=./tesser_syslog
|
||||||
|
cores=2
|
||||||
|
|
||||||
|
mkdir -p $lockfile
|
||||||
|
|
||||||
|
while [ -e "$lockfile"/"`basename $0`" ];
|
||||||
|
do
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
|
||||||
|
if ( set -o noclobber; echo "locked" > "$lockfile"/"`basename $0`"); then
|
||||||
|
|
||||||
|
trap 'rm -f "$lockfile"/"`basename $0`"; echo $(date) " Lockdatei wird geloescht: " $lockfile"/"`basename $0` Aufrufparameter: $* >> $protokolldatei ;rm -r $temp_folder; exit $?' INT TERM KILL EXIT
|
||||||
|
#das Datum mit dem Scriptnamen in die Protokolldatei schreiben
|
||||||
|
echo $(date) " Lockdatei erstellt: " $lockfile"/"`basename $0` >> $protokolldatei
|
||||||
|
|
||||||
|
else
|
||||||
|
#Script beenden falls Lockdatei nicht erstellt werden konnte
|
||||||
|
echo $(date) " Programm wird beendet, Lockdatei konnte nicht erstellt werden: $lockfile"/"`basename $0` Aufrufparameter: $* " >> $protokolldatei
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p $temp_folder
|
||||||
|
|
||||||
|
$(pdftotext -raw $1 - 1> $temp_folder''tmp.txt )
|
||||||
|
pdf_contents=`cat $temp_folder''tmp.txt`
|
||||||
|
pdf_contents=`echo "$pdf_contents" | tr -dc '[:print:]'`
|
||||||
|
if [ -z "$pdf_contents" ]; then
|
||||||
|
convert -density 300 -quality 95 $inputpdf +adjoin $temp_folder''image%03d.jpg
|
||||||
|
find $temp_folder -name '*.jpg'| parallel --gnu -j $cores tesseract -l deu --psm 6 {} {} pdf
|
||||||
|
|
||||||
|
num=`find $temp_folder -name '*.pdf'| wc -l`
|
||||||
|
if [ "$num" -gt "1" ]; then
|
||||||
|
pdfunite $temp_folder*.pdf $temp_folder''tmp.pdf
|
||||||
|
else
|
||||||
|
mv $temp_folder*.pdf $temp_folder''tmp.pdf
|
||||||
|
fi
|
||||||
|
pdftotext $temp_folder''tmp.pdf $temp_folder''tmp.txt
|
||||||
|
mv $temp_folder''tmp.pdf $1
|
||||||
|
fi
|
||||||
|
cat $temp_folder''tmp.txt
|
|
@ -176,9 +176,9 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
|
||||||
<td><?= getMLText($title) ?></td>
|
<td><?= getMLText($title) ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php if($multiple) { ?>
|
<?php if($multiple) { ?>
|
||||||
<select class="form-control" name="<?= $name ?>[]" multiple>
|
<select class="chzn-select form-control" style="width: 100%;" name="<?= $name ?>[]" multiple>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<select class="form-control" name="<?= $name ?>">
|
<select class="chzn-select form-control" style="width: 100%;" name="<?= $name ?>">
|
||||||
<?php }
|
<?php }
|
||||||
foreach($values as $i=>$value) {
|
foreach($values as $i=>$value) {
|
||||||
$optval = trim($isass ? $i : $value);
|
$optval = trim($isass ? $i : $value);
|
||||||
|
@ -588,7 +588,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
||||||
case 'select':
|
case 'select':
|
||||||
if(!empty($conf['options'])) {
|
if(!empty($conf['options'])) {
|
||||||
$selections = empty($settings->_extensions[$extname][$confkey]) ? array() : explode(",", $settings->_extensions[$extname][$confkey]);
|
$selections = empty($settings->_extensions[$extname][$confkey]) ? array() : explode(",", $settings->_extensions[$extname][$confkey]);
|
||||||
echo "<select class=\"chzn-select\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "").">";
|
echo "<select class=\"chzn-select\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." style=\"width: 100%;\">";
|
||||||
foreach($conf['options'] as $key=>$opt) {
|
foreach($conf['options'] as $key=>$opt) {
|
||||||
echo "<option value=\"".$key."\"";
|
echo "<option value=\"".$key."\"";
|
||||||
if(in_array($key, $selections))
|
if(in_array($key, $selections))
|
||||||
|
@ -603,7 +603,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
||||||
case "categories":
|
case "categories":
|
||||||
$categories = $dms->getDocumentCategories();
|
$categories = $dms->getDocumentCategories();
|
||||||
if($categories) {
|
if($categories) {
|
||||||
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_category")."\">";
|
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_category")."\" style=\"width: 100%;\">";
|
||||||
if($allowempty)
|
if($allowempty)
|
||||||
echo "<option value=\"\"></option>";
|
echo "<option value=\"\"></option>";
|
||||||
foreach($categories as $category) {
|
foreach($categories as $category) {
|
||||||
|
@ -618,7 +618,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
||||||
case "users":
|
case "users":
|
||||||
$users = $dms->getAllUsers();
|
$users = $dms->getAllUsers();
|
||||||
if($users) {
|
if($users) {
|
||||||
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_user")."\">";
|
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_user")."\" style=\"width: 100%;\">";
|
||||||
if($allowempty)
|
if($allowempty)
|
||||||
echo "<option value=\"\"></option>";
|
echo "<option value=\"\"></option>";
|
||||||
foreach($users as $curuser) {
|
foreach($users as $curuser) {
|
||||||
|
@ -633,7 +633,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
||||||
case "groups":
|
case "groups":
|
||||||
$recs = $dms->getAllGroups();
|
$recs = $dms->getAllGroups();
|
||||||
if($recs) {
|
if($recs) {
|
||||||
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_group")."\">";
|
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_group")."\" style=\"width: 100%;\">";
|
||||||
if($allowempty)
|
if($allowempty)
|
||||||
echo "<option value=\"\"></option>";
|
echo "<option value=\"\"></option>";
|
||||||
foreach($recs as $rec) {
|
foreach($recs as $rec) {
|
||||||
|
@ -650,7 +650,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
||||||
$attrtype = empty($conf['attrtype']) ? 0 : $conf['attrtype'];
|
$attrtype = empty($conf['attrtype']) ? 0 : $conf['attrtype'];
|
||||||
$recs = $dms->getAllAttributeDefinitions($objtype, $attrtype);
|
$recs = $dms->getAllAttributeDefinitions($objtype, $attrtype);
|
||||||
if($recs) {
|
if($recs) {
|
||||||
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_attrdef")."\" data-no_results_text=\"".getMLText('unknown_attrdef')."\">";
|
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_attrdef")."\" data-no_results_text=\"".getMLText('unknown_attrdef')."\" style=\"width: 100%;\">";
|
||||||
if($allowempty)
|
if($allowempty)
|
||||||
echo "<option value=\"\"></option>";
|
echo "<option value=\"\"></option>";
|
||||||
foreach($recs as $rec) {
|
foreach($recs as $rec) {
|
||||||
|
@ -667,7 +667,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
||||||
case "workflows":
|
case "workflows":
|
||||||
$recs = $dms->getAllWorkflows();
|
$recs = $dms->getAllWorkflows();
|
||||||
if($recs) {
|
if($recs) {
|
||||||
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_attribute_value")."\">";
|
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_attribute_value")."\" style=\"width: 100%;\">";
|
||||||
if($allowempty)
|
if($allowempty)
|
||||||
echo "<option value=\"\"></option>";
|
echo "<option value=\"\"></option>";
|
||||||
foreach($recs as $rec) {
|
foreach($recs as $rec) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user