Commit eb46f71dbf46b74a95475c63b8f06f369f08a769

Authored by michael
1 parent 24e06fab

only restrict document type editing for non sysadmins


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1648 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/administration/doctypemanagement/editDocTypeUI.inc
@@ -186,8 +186,11 @@ function getDocTypeDisplay($oDocType) { @@ -186,8 +186,11 @@ function getDocTypeDisplay($oDocType) {
186 global $default; 186 global $default;
187 if (!isset($oDocType)) { 187 if (!isset($oDocType)) {
188 $oPatternListBox = & new PatternListBox($default->owl_document_types_table, "name", "id", "fDocTypeID"); 188 $oPatternListBox = & new PatternListBox($default->owl_document_types_table, "name", "id", "fDocTypeID");
189 - $oPatternListBox->setFromClause("LEFT OUTER JOIN $default->owl_documents_table D on ST.id=D.document_type_id");  
190 - $oPatternListBox->setWhereClause("ISNULL(D.id)"); 189 + // only restrict doc type editing for non sys admins
  190 + if (!Permission::userIsSystemAdministrator()) {
  191 + $oPatternListBox->setFromClause("LEFT OUTER JOIN $default->owl_documents_table D on ST.id=D.document_type_id");
  192 + $oPatternListBox->setWhereClause("ISNULL(D.id)");
  193 + }
191 $oPatternListBox->setPostBackOnChange(true); 194 $oPatternListBox->setPostBackOnChange(true);
192 return $oPatternListBox->render(); 195 return $oPatternListBox->render();
193 } else { 196 } else {