mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
make mayEditVersion() work again
This commit is contained in:
parent
c7836aabfe
commit
a693233150
|
@ -62,12 +62,12 @@ class SeedDMS_AccessOperation {
|
|||
* document may delete versions. The admin may even delete a version
|
||||
* even if is disallowed in the settings.
|
||||
*/
|
||||
function mayEditVersion() { /* {{{ */
|
||||
if(get_class($this->obj) == 'SeedDMS_Core_Document') {
|
||||
$version = $this->obj->getLatestContent();
|
||||
function mayEditVersion($document) { /* {{{ */
|
||||
if(get_class($document) == $this->dms->getClassname('document')) {
|
||||
$version = $document->getLatestContent();
|
||||
if (!isset($this->settings->_editOnlineFileTypes) || !is_array($this->settings->_editOnlineFileTypes) || !in_array(strtolower($version->getFileType()), $this->settings->_editOnlineFileTypes))
|
||||
return false;
|
||||
if ($this->obj->getAccessMode($this->user) == M_ALL || $this->user->isAdmin()) {
|
||||
if ($document->getAccessMode($this->user) == M_ALL || $this->user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user