This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
Sequenzia/lib/Rails/Panel/controllers/ApplicationController.php
2013-10-02 11:14:53 -05:00

19 lines
425 B
PHP
Executable File

<?php
class ApplicationController extends Rails\ActionController\Base
{
final protected function filters()
{
return [
'before' => [
'isUserAllowed'
]
];
}
final protected function isUserAllowed()
{
if (!Rails::application()->validateSafeIps()) {
$this->render(['action' => 'forbidden'], ['status' => 403]);
}
}
}