mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-02 06:57:40 +00:00
add optional version number to mayEditOnline()
This commit is contained in:
parent
11f67105bd
commit
e0dcd86f5a
|
@ -54,9 +54,12 @@ class SeedDMS_AccessOperation {
|
|||
* document may delete versions. The admin may even delete a version
|
||||
* even if is disallowed in the settings.
|
||||
*/
|
||||
function mayEditVersion() { /* {{{ */
|
||||
function mayEditVersion($vno=0) { /* {{{ */
|
||||
if(get_class($this->obj) == 'SeedDMS_Core_Document') {
|
||||
$version = $this->obj->getLatestContent();
|
||||
if($vno)
|
||||
$version = $this->obj->getContentByVersion($vno);
|
||||
else
|
||||
$version = $this->obj->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()) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user