pass $dms to contructor of SeedDMS_AccessOperation

This commit is contained in:
Uwe Steinmann 2015-08-07 13:11:50 +02:00
parent 421bf3e81a
commit 482143c04f
26 changed files with 33 additions and 26 deletions

View File

@ -21,6 +21,12 @@
* @version Release: @package_version@
*/
class SeedDMS_AccessOperation {
/**
* @var object $dms reference to dms
* @access protected
*/
private $obj;
/**
* @var object $obj object being accessed
* @access protected
@ -39,7 +45,8 @@ class SeedDMS_AccessOperation {
*/
private $settings;
function __construct($obj, $user, $settings) { /* {{{ */
function __construct($dms, $obj, $user, $settings) { /* {{{ */
$this->dms = $dms;
$this->obj = $obj;
$this->user = $user;
$this->settings = $settings;

View File

@ -71,7 +71,7 @@ if ($latestContent->getVersion()!=$version) {
}
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
// verify if document may be approved
if (!$accessop->mayApprove()){

View File

@ -68,7 +68,7 @@ if ($latestContent->getVersion()!=$version) {
}
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
// verify if document may be reviewed
if (!$accessop->mayReview()){

View File

@ -45,7 +45,7 @@ if ($document->getAccessMode($user) < M_READWRITE) {
}
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'strictformcheck'=>$settings->_strictFormCheck, 'enablelargefileupload'=>$settings->_enableLargeFileUpload));

View File

@ -41,7 +41,7 @@ if (!is_object($document)) {
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
if ($document->getAccessMode($user) < M_READ) {
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied"));

View File

@ -47,7 +47,7 @@ $allUsers = $dms->getAllUsers($settings->_sortUsersInList);
$allGroups = $dms->getAllGroups();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'allusers'=>$allUsers, 'allgroups'=>$allGroups));

View File

@ -45,7 +45,7 @@ if ($document->getAccessMode($user) < M_READ) {
}
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'sortusersinlist'=>$settings->_sortUsersInList));

View File

@ -67,7 +67,7 @@ if ($latestContent->getVersion()==$version->getVersion()) {
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$version, 'viewonlinefiletypes'=>$settings->_viewOnlineFileTypes, 'enableversionmodification'=>$settings->_enableVersionModification, 'previewwidthdetail'=>$settings->_previewWidthDetail, 'cachedir'=>$settings->_cacheDir));

View File

@ -46,7 +46,7 @@ if (!is_object($version)) {
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_all));

View File

@ -51,7 +51,7 @@ if (!is_object($version)) {
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$version, 'strictformcheck'=>$settings->_strictFormCheck));

View File

@ -51,7 +51,7 @@ $folder = $document->getFolder();
$attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_document, SeedDMS_Core_AttributeDefinition::objtype_all));
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'attrdefs'=>$attrdefs, 'strictformcheck'=>$settings->_strictFormCheck, 'orderby'=>$settings->_sortFoldersDefault));

View File

@ -64,7 +64,7 @@ if(isset($_GET['targetid']) && $_GET['targetid']) {
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'target'=>$target));

View File

@ -62,7 +62,7 @@ if ($overallStatus["status"] == S_REJECTED || $overallStatus["status"] == S_EXPI
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$content));

View File

@ -51,7 +51,7 @@ if($document->isLocked()) {
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document));

View File

@ -53,7 +53,7 @@ if (($document->getAccessMode($user) < M_ALL)&&($user->getID()!=$file->getUserID
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'file'=>$file));

View File

@ -60,7 +60,7 @@ if (!is_object($version)) {
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$version));

View File

@ -60,7 +60,7 @@ if (!is_object($workflow)) {
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$version));

View File

@ -60,7 +60,7 @@ if ($latestContent->getVersion()!=$version) {
}
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
// verify if document may be reviewed
if (!$accessop->mayReview()){

View File

@ -60,7 +60,7 @@ if (!is_object($workflow)) {
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$version));

View File

@ -65,7 +65,7 @@ if (!is_object($subworkflow)) {
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$version, 'subworkflow'=>$subworkflow));

View File

@ -44,7 +44,7 @@ if ($document->getAccessMode($user) < M_READWRITE) {
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document));

View File

@ -64,7 +64,7 @@ if ($overallStatus["status"]!=S_DRAFT_REV && $overallStatus["status"]!=S_DRAFT_A
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$content, 'enableadminrevapp'=>$settings->_enableAdminRevApp, 'enableownerrevapp'=>$settings->_enableOwnerRevApp, 'enableselfrevapp'=>$settings->_enableSelfRevApp));

View File

@ -51,7 +51,7 @@ if (!is_object($version)) {
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$version));

View File

@ -61,7 +61,7 @@ if (!is_object($transition)) {
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$version, 'transition'=>$transition));

View File

@ -58,7 +58,7 @@ if($settings->_quota > 0) {
$folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'strictformcheck'=>$settings->_strictFormCheck, 'enablelargefileupload'=>$settings->_enableLargeFileUpload, 'enableadminrevapp'=>$settings->_enableAdminRevApp, 'enableownerrevapp'=>$settings->_enableOwnerRevApp, 'enableselfrevapp'=>$settings->_enableSelfRevApp, 'dropfolderdir'=>$settings->_dropFolderDir, 'workflowmode'=>$settings->_workflowMode, 'presetexpiration'=>$settings->_presetExpirationDate));

View File

@ -49,7 +49,7 @@ if (!is_object($document)) {
}
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, $document, $user, $settings);
$folder = $document->getFolder();