Skip to content

Commit

Permalink
refs nextcloud#6962, refs nextcloud#5309; do not throw AppNotEnabledE…
Browse files Browse the repository at this point in the history
…xception for app public pages

Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
Julien Veyssier committed Feb 28, 2018
1 parent 0cfdf47 commit 352acd2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ public function beforeController($controller, $methodName) {
* Checks if app is enabled (also includes a check whether user is allowed to access the resource)
* The getAppPath() check is here since components such as settings also use the AppFramework and
* therefore won't pass this check.
* If page is public, app does not need to be enabled for current user/visitor
*/
if(\OC_App::getAppPath($this->appName) !== false && !$this->appManager->isEnabledForUser($this->appName)) {
if(\OC_App::getAppPath($this->appName) !== false && !$isPublicPage && !$this->appManager->isEnabledForUser($this->appName)) {
throw new AppNotEnabledException();
}

Expand Down

0 comments on commit 352acd2

Please sign in to comment.