-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement forbidden message instead of redirection
When user is connected but is not allowed to access part of app
- Loading branch information
1 parent
afbf766
commit 556f28c
Showing
7 changed files
with
161 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php $this->layout('layout', ['title' => 'Forbidden', 'description' => 'forbidden', 'stylesheets' => [$css . 'home.css']]) ?> | ||
|
||
|
||
|
||
|
||
<?php $this->start('page') ?> | ||
|
||
<h1>Forbidden</h1> | ||
|
||
<span> | ||
<?= $user->level() ?> | ||
</span> | ||
|
||
<?php if($user->isinvite()) { ?> | ||
<p> | ||
Sorry <?= $user->name() ?>, you are not allowed to do this. | ||
</p> | ||
<?php } ?> | ||
|
||
<?php | ||
if(in_array($route, ['pageedit', 'pageread', 'pageadd'])) { | ||
echo '<p><a href="' . $this->upage('pageread', $id) . '">back to page read view</a></p>'; | ||
} else { | ||
echo '<p><a href="' . $this->url('home') . '">Go back to home</a>'; | ||
} | ||
?> | ||
|
||
<?php $this->stop() ?> |
This file was deleted.
Oops, something went wrong.