From 5bd9e432b1de74fadc4dbdecb9e9e53323d4c6be Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Tue, 22 Jul 2003 09:07:29 +0000 Subject: [PATCH] (#2616) added check to see if default users have been assigned to routing steps --- presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php index 21f1a5b..6211517 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php @@ -86,14 +86,22 @@ if (checkSession()) { $oDocument->beginCollaborationProcess(); $sStatusMessage = "Document collaboration successfully started"; $oPatternCustom->setHtml(getStatusPage($oDocument, $sStatusMessage)); - } else { - //not all the roles have actual users assigned to them, so we must assign the - //default users and then proceed + } else { + // check that default users have been assigned to the routing steps before using them - FolderUserRole::createDefaultFolderUserRoles($oDocument); - $oDocument->beginCollaborationProcess(); - $sStatusMessage = "Document collaboration successfully started"; - $oPatternCustom->setHtml(getStatusPage($oDocument, $sStatusMessage)); + if (FolderCollaboration::defaultUsersAssigned($aFolderCollaboration)) { + //not all the roles have actual users assigned to them, so we must assign the + //default users and then proceed + + FolderUserRole::createDefaultFolderUserRoles($oDocument); + $oDocument->beginCollaborationProcess(); + $sStatusMessage = "Document collaboration successfully started"; + $oPatternCustom->setHtml(getStatusPage($oDocument, $sStatusMessage)); + } else { + // the folder does not have default users assigned for the routing steps + $sStatusMessage = "Default users have not been assigned at the folder level. Please set these up, or choose specific users for this document before attempting to start collaboration."; + $oPatternCustom->setHtml(getStatusPage($oDocument, $sStatusMessage)); + } } } else { //the folder has no collaboration set up yet, so we can't start document collaboration -- libgit2 0.21.4