Skip to content

Commit

Permalink
Do not throw AppNotEnabledException for app public pages - refs nextc…
Browse files Browse the repository at this point in the history
…loud#6962, refs nextcloud#5309

Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
Julien Veyssier committed Feb 28, 2018
1 parent 0cfdf47 commit b63b936
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 b63b936

Please sign in to comment.