Przeglądaj źródła

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 lat temu
rodzic
commit
b9bfb5c946
1 zmienionych plików z 2 dodań i 2 usunięć
  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;