Commit 7a3e4f517520d26d304ac3bdb3830be968078f78
1 parent
cb0e8f29
ensure that permissions are rebuilt on upgrade - needed due to role bug.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5736 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
8 additions
and
1 deletions
docs/VERSION.txt
lib/upgrades/UpgradeFunctions.inc.php
| ... | ... | @@ -40,6 +40,7 @@ class UpgradeFunctions { |
| 40 | 40 | "3.0.2" => array("fixDocumentRoleAllocation"), |
| 41 | 41 | "3.0.3.2" => array("createFolderDetailsPermission"), |
| 42 | 42 | "3.0.3.3" => array("generateWorkflowTriggers"), |
| 43 | + "3.0.3.7" => array("rebuildAllPermissions"), | |
| 43 | 44 | ); |
| 44 | 45 | |
| 45 | 46 | var $descriptions = array( |
| ... | ... | @@ -56,6 +57,7 @@ class UpgradeFunctions { |
| 56 | 57 | 'fixDocumentRoleAllocation' => 'Fix the document role allocation upgrade from 3.0.1', |
| 57 | 58 | 'createFolderDetailsPermission' => 'Create the Core: Folder Details permission', |
| 58 | 59 | 'generateWorkflowTriggers' => 'Migrate old in-transition guards to triggers', |
| 60 | + 'rebuildAllPermissions' => 'Rebuild all permissions to ensure correct functioning of permission-definitions.' | |
| 59 | 61 | ); |
| 60 | 62 | var $phases = array( |
| 61 | 63 | "setPermissionFolder" => 1, |
| ... | ... | @@ -759,6 +761,11 @@ class UpgradeFunctions { |
| 759 | 761 | } |
| 760 | 762 | |
| 761 | 763 | } |
| 764 | + | |
| 765 | + function rebuildAllPermissions() { | |
| 766 | + $oRootFolder = Folder::get(1); | |
| 767 | + KTPermissionUtil::updatePermissionLookupRecursive($oRootFolder); | |
| 768 | + } | |
| 762 | 769 | |
| 763 | 770 | } |
| 764 | 771 | ... | ... |