mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-16 14:41:39 +00:00
do not set the uploader of a document to the owner
use the currently logged in user instead
This commit is contained in:
parent
8ecc721f3c
commit
57dc5fa31a
|
@ -10,6 +10,8 @@
|
||||||
- add number of documents which need correction to menu
|
- add number of documents which need correction to menu
|
||||||
- minor 2 factor auth. fixes when initially setting the secret
|
- minor 2 factor auth. fixes when initially setting the secret
|
||||||
- remove ѕome unneeded code from AddDocument which just caused php warnings
|
- remove ѕome unneeded code from AddDocument which just caused php warnings
|
||||||
|
- do not set the uploader of new documents to owner if the owner is different from
|
||||||
|
the uploader
|
||||||
- merge changes up to 5.1.6
|
- merge changes up to 5.1.6
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
|
@ -439,6 +439,7 @@ class SeedDMS_Core_DMS {
|
||||||
$this->enableConverting = false;
|
$this->enableConverting = false;
|
||||||
$this->convertFileTypes = array();
|
$this->convertFileTypes = array();
|
||||||
$this->noReadForStatus = array();
|
$this->noReadForStatus = array();
|
||||||
|
$this->user = null;
|
||||||
$this->classnames = array();
|
$this->classnames = array();
|
||||||
$this->classnames['folder'] = 'SeedDMS_Core_Folder';
|
$this->classnames['folder'] = 'SeedDMS_Core_Folder';
|
||||||
$this->classnames['document'] = 'SeedDMS_Core_Document';
|
$this->classnames['document'] = 'SeedDMS_Core_Document';
|
||||||
|
@ -620,8 +621,9 @@ class SeedDMS_Core_DMS {
|
||||||
/**
|
/**
|
||||||
* Set the logged in user
|
* Set the logged in user
|
||||||
*
|
*
|
||||||
* If user authentication was done externally, this function can
|
* This method tells SeeDMS_Core_DMS the currently logged in user. It must be
|
||||||
* be used to tell the dms who is currently logged in.
|
* called right after instanciating the class, because some methods in
|
||||||
|
* SeedDMS_Core_Document() require the currently logged in user.
|
||||||
*
|
*
|
||||||
* @param object $user
|
* @param object $user
|
||||||
*
|
*
|
||||||
|
@ -633,8 +635,7 @@ class SeedDMS_Core_DMS {
|
||||||
/**
|
/**
|
||||||
* Get the logged in user
|
* Get the logged in user
|
||||||
*
|
*
|
||||||
* If user authentication was done externally, this function can
|
* Returns the currently logged in user, as set by setUser()
|
||||||
* be used to tell the dms who is currently logged in.
|
|
||||||
*
|
*
|
||||||
* @return SeedDMS_Core_User $user
|
* @return SeedDMS_Core_User $user
|
||||||
*
|
*
|
||||||
|
|
|
@ -917,9 +917,8 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
||||||
|
|
||||||
$document = $this->_dms->getDocument($db->getInsertID('tblDocuments'));
|
$document = $this->_dms->getDocument($db->getInsertID('tblDocuments'));
|
||||||
|
|
||||||
// if ($version_comment!="")
|
$curuser = $this->_dms->getLoggedInUser();
|
||||||
$res = $document->addContent($version_comment, $owner, $tmpFile, $orgFileName, $fileType, $mimeType, $reviewers, $approvers, $reqversion, $version_attributes, $workflow, $initstate);
|
$res = $document->addContent($version_comment, $curuser ? $curuser : $owner, $tmpFile, $orgFileName, $fileType, $mimeType, $reviewers, $approvers, $reqversion, $version_attributes, $workflow, $initstate);
|
||||||
// else $res = $document->addContent($comment, $owner, $tmpFile, $orgFileName, $fileType, $mimeType, $reviewers, $approvers,$reqversion, $version_attributes, $workflow);
|
|
||||||
|
|
||||||
if (is_bool($res) && !$res) {
|
if (is_bool($res) && !$res) {
|
||||||
$db->rollbackTransaction();
|
$db->rollbackTransaction();
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<email>uwe@steinmann.cx</email>
|
<email>uwe@steinmann.cx</email>
|
||||||
<active>yes</active>
|
<active>yes</active>
|
||||||
</lead>
|
</lead>
|
||||||
<date>2018-03-14</date>
|
<date>2018-04-03</date>
|
||||||
<time>09:19:24</time>
|
<time>09:19:24</time>
|
||||||
<version>
|
<version>
|
||||||
<release>6.0.6</release>
|
<release>6.0.6</release>
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
</stability>
|
</stability>
|
||||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||||
<notes>
|
<notes>
|
||||||
|
SeedDMS_Core_Folder::addContent() uses currently logged in user as uploader instead of owner
|
||||||
SeedDMS_Core_DocumentContent::verifyStatus() will not set status to S_RELEASED
|
SeedDMS_Core_DocumentContent::verifyStatus() will not set status to S_RELEASED
|
||||||
if currently in S_DRAFT status und no workflow, review, approval, or revision
|
if currently in S_DRAFT status und no workflow, review, approval, or revision
|
||||||
is pending.
|
is pending.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user