소스 검색

Archives: show the menu 'activate archive mode' only if there is at least one archivable class

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4701 a333f486-631f-4898-b8df-5754b55c2be0
romainq 8 년 전
부모
커밋
b9bfb5c946
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      core/userrights.class.inc.php

+ 2 - 2
core/userrights.class.inc.php

@@ -657,8 +657,8 @@ class UserRights
 		}
 		else
 		{
-			// As of now, anybody can swith to the archive mode
-			$bRet = true;
+			// As of now, anybody can switch to the archive mode as soon as there is an archivable class
+			$bRet = (count(MetaModel::EnumArchivableClasses()) > 0);
 			$_SESSION['archive_allowed'] = $bRet;
 		}
 		return $bRet;