mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +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
|
||||
- minor 2 factor auth. fixes when initially setting the secret
|
||||
- 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
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
|
|
@ -439,6 +439,7 @@ class SeedDMS_Core_DMS {
|
|||
$this->enableConverting = false;
|
||||
$this->convertFileTypes = array();
|
||||
$this->noReadForStatus = array();
|
||||
$this->user = null;
|
||||
$this->classnames = array();
|
||||
$this->classnames['folder'] = 'SeedDMS_Core_Folder';
|
||||
$this->classnames['document'] = 'SeedDMS_Core_Document';
|
||||
|
@ -620,8 +621,9 @@ class SeedDMS_Core_DMS {
|
|||
/**
|
||||
* Set the logged in user
|
||||
*
|
||||
* If user authentication was done externally, this function can
|
||||
* be used to tell the dms who is currently logged in.
|
||||
* This method tells SeeDMS_Core_DMS the currently logged in user. It must be
|
||||
* called right after instanciating the class, because some methods in
|
||||
* SeedDMS_Core_Document() require the currently logged in user.
|
||||
*
|
||||
* @param object $user
|
||||
*
|
||||
|
@ -633,8 +635,7 @@ class SeedDMS_Core_DMS {
|
|||
/**
|
||||
* Get the logged in user
|
||||
*
|
||||
* If user authentication was done externally, this function can
|
||||
* be used to tell the dms who is currently logged in.
|
||||
* Returns the currently logged in user, as set by setUser()
|
||||
*
|
||||
* @return SeedDMS_Core_User $user
|
||||
*
|
||||
|
|
|
@ -917,9 +917,8 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
|||
|
||||
$document = $this->_dms->getDocument($db->getInsertID('tblDocuments'));
|
||||
|
||||
// if ($version_comment!="")
|
||||
$res = $document->addContent($version_comment, $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);
|
||||
$curuser = $this->_dms->getLoggedInUser();
|
||||
$res = $document->addContent($version_comment, $curuser ? $curuser : $owner, $tmpFile, $orgFileName, $fileType, $mimeType, $reviewers, $approvers, $reqversion, $version_attributes, $workflow, $initstate);
|
||||
|
||||
if (is_bool($res) && !$res) {
|
||||
$db->rollbackTransaction();
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<email>uwe@steinmann.cx</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<date>2018-03-14</date>
|
||||
<date>2018-04-03</date>
|
||||
<time>09:19:24</time>
|
||||
<version>
|
||||
<release>6.0.6</release>
|
||||
|
@ -24,6 +24,7 @@
|
|||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<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
|
||||
if currently in S_DRAFT status und no workflow, review, approval, or revision
|
||||
is pending.
|
||||
|
|
Loading…
Reference in New Issue
Block a user