[Pkg-owncloud-commits] [owncloud] 229/258: Clear enabled apps cache after loading authentication app

David Prévot taffit at moszumanska.debian.org
Sat Oct 11 17:22:39 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 24dbdd2b8edc8a9dc83c5763f7ef6e357329aed3
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Thu Oct 9 13:22:14 2014 +0200

    Clear enabled apps cache after loading authentication app
    
    Since getEnabledApps() depends on an authentication app to be loaded,
    especially in the case of LDAP, the cache from getEnabledApps() is now
    cleared to make sure that subsequent calls will properly return apps
    that were enabled for groups.
    This is because getEnabledApps() uses the inGroups() function from the
    group manager provided by LDAP or any other authentication app.
    
    Backport of 36d22825e0797eedd1c239a70bbb385fa8ac7042 from master
---
 lib/private/app.php | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/private/app.php b/lib/private/app.php
index 7006153..a619504 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -93,6 +93,13 @@ class OC_App {
 				throw new \OC\NeedsUpdateException();
 			}
 			require_once $app . '/appinfo/app.php';
+			if (self::isType($app, array('authentication'))) {
+				// since authentication apps affect the "is app enabled for group" check,
+				// the enabled apps cache needs to be cleared to make sure that the
+				// next time getEnableApps() is called it will also include apps that were
+				// enabled for groups
+				self::$enabledAppsCache = array();
+			}
 		}
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list