Closed crunchprank closed 8 years ago
If you have a look in https://github.com/Clidus/gwl/blob/master/ignition_application/controllers/ignition/admin.php you'll see a good example of how this is done.
Simply add this to the top of the index
function in the search controller:
// restricted page
if($this->session->userdata('Admin') != 1)
show_404();
This will return a 404 page if you don't have admin privileges. :)
Perfect! Thanks, once again!
No problem :)
This is a general question for just my GWL install, and I'm not requesting this to be pushed to the public repo. But if at all possible, I was curious if there was a way to restrict certain pages to only be accessible when being logged in as Admin. Specifically I'd like to lock down the search page. If so, how would I go about doing this? Thanks!