mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
pass $dms to contructor of SeedDMS_AccessOperation
This commit is contained in:
parent
421bf3e81a
commit
482143c04f
|
@ -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;
|
||||
|
|
|
@ -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()){
|
||||
|
|
|
@ -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()){
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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()){
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user