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

19 lines
425 B
PHP
Raw Normal View History

2013-10-02 18:14:53 +02:00
<?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]);
}
}
}