1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Made custom home ignore permissions and added tests

Closes #126 and #372
This commit is contained in:
Dan Brown
2017-08-28 13:55:39 +01:00
parent 55759bd22a
commit 0a402e3c63
4 changed files with 57 additions and 5 deletions

View File

@ -37,8 +37,8 @@ class HomeController extends Controller
$homepageSetting = setting('app-homepage');
if ($homepageSetting) {
$id = intval(explode(':', $homepageSetting)[0]);
$customHomepage = $this->entityRepo->getById('page', $id);
$this->entityRepo->renderPage($customHomepage);
$customHomepage = $this->entityRepo->getById('page', $id, false, true);
$this->entityRepo->renderPage($customHomepage, true);
}
$view = $customHomepage ? 'home-custom' : 'home';