Difference between revisions of "Extensions:Admin Only Pages"
Tag: 2017 source edit |
(Fix grammar and add a couple things so we can see if the Table of Contents gets added) Tag: 2017 source edit |
||
Line 1: | Line 1: | ||
− | {{Extensioninfobox|title=Admin Only Pages|desc=Set pages as | + | {{Extensioninfobox|title=Admin Only Pages|desc=Set pages as staff-only.|auth=Preimpression|status=testing|github={{Github|user=preimpression|branch=admin-only_pages}}|migration=yes|package=no}} |
− | This is a simple extension based on vanilla Lorekeeper. It allows | + | This is a simple extension based on vanilla Lorekeeper. It allows staff members to set pages to be admin-only. When a non-staff user or guest attempts to visit an admin-only page, they will be redirected to the home page with the standard warning. This warning is contained in the Controller and is separate from the regular admin middleware, so if you have edited that flash elsewhere, you'll need to edit it again here. |
== Installation == | == Installation == | ||
Line 15: | Line 15: | ||
== Usage == | == Usage == | ||
Pre-existing pages will automatically be set to false (0 in the database.) To set a page to be admin-only, go to the admin panel and edit the page. The toggle will be right below the Is-Visible toggle. | Pre-existing pages will automatically be set to false (0 in the database.) To set a page to be admin-only, go to the admin panel and edit the page. The toggle will be right below the Is-Visible toggle. | ||
+ | |||
+ | ==Troubleshooting== | ||
+ | <!-- Are there known issues or errors that require user action? Who should they contact, and where, for support? --> | ||
+ | ==See Also== | ||
+ | <!-- Any relevant other pages. You may consider linking to related extensions, for instance. --> | ||
+ | <br /> |
Revision as of 18:58, 4 August 2020
Description | Set pages as staff-only. |
---|---|
Author(s) | Preimpression |
Status | testing |
Github | admin-only_pages |
LK Version | Unspecified |
Contains a Migration | |
This is a simple extension based on vanilla Lorekeeper. It allows staff members to set pages to be admin-only. When a non-staff user or guest attempts to visit an admin-only page, they will be redirected to the home page with the standard warning. This warning is contained in the Controller and is separate from the regular admin middleware, so if you have edited that flash elsewhere, you'll need to edit it again here.
Installation
Pull the branch.
php artisan migrate
Done!
Configuration
There is a very simple migration that adds a column called "admin_only". No other configuration should be necessary.
Usage
Pre-existing pages will automatically be set to false (0 in the database.) To set a page to be admin-only, go to the admin panel and edit the page. The toggle will be right below the Is-Visible toggle.
Troubleshooting
See Also