mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 02:45:58 +00:00
Add audit things.
This commit is contained in:
@@ -59,10 +59,11 @@ class CreateController extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
Log::channel('audit')->info('User visits webhook create page.');
|
||||
if(false === config('firefly.allow_webhooks')) {
|
||||
Log::channel('audit')->info('User visits webhook create page, but webhooks are DISABLED.');
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
}
|
||||
Log::channel('audit')->info('User visits webhook create page.');
|
||||
$previousUrl = $this->rememberPreviousUrl('webhooks.create.url');
|
||||
|
||||
return view('webhooks.create', compact('previousUrl'));
|
||||
|
@@ -63,10 +63,11 @@ class DeleteController extends Controller
|
||||
*/
|
||||
public function index(Webhook $webhook)
|
||||
{
|
||||
Log::channel('audit')->info('User visits webhook delete page.');
|
||||
if(false === config('firefly.allow_webhooks')) {
|
||||
Log::channel('audit')->info('User visits webhook delete page, but webhooks are DISABLED.');
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
}
|
||||
Log::channel('audit')->info('User visits webhook delete page.');
|
||||
$subTitle = (string)trans('firefly.delete_webhook', ['title' => $webhook->title]);
|
||||
$this->rememberPreviousUrl('webhooks.delete.url');
|
||||
|
||||
|
@@ -62,10 +62,11 @@ class EditController extends Controller
|
||||
*/
|
||||
public function index(Webhook $webhook)
|
||||
{
|
||||
Log::channel('audit')->info('User visits webhook edit page.');
|
||||
if(false === config('firefly.allow_webhooks')) {
|
||||
Log::channel('audit')->info('User visits webhook edit page, but webhooks are DISABLED.');
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
}
|
||||
Log::channel('audit')->info('User visits webhook edit page.');
|
||||
$subTitle = (string)trans('firefly.edit_webhook', ['title' => $webhook->title]);
|
||||
$this->rememberPreviousUrl('webhooks.edit.url');
|
||||
|
||||
|
@@ -55,10 +55,11 @@ class IndexController extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
Log::channel('audit')->info('User visits webhook index page.');
|
||||
if(false === config('firefly.allow_webhooks')) {
|
||||
Log::channel('audit')->info('User visits webhook index page, but webhooks are DISABLED.');
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
}
|
||||
Log::channel('audit')->info('User visits webhook index page.');
|
||||
|
||||
return view('webhooks.index');
|
||||
}
|
||||
|
@@ -62,10 +62,11 @@ class ShowController extends Controller
|
||||
*/
|
||||
public function index(Webhook $webhook)
|
||||
{
|
||||
Log::channel('audit')->info(sprintf('User visits webhook #%d page.', $webhook->id));
|
||||
if(false === config('firefly.allow_webhooks')) {
|
||||
Log::channel('audit')->info(sprintf('User visits webhook #%d page, but webhooks are DISABLED.', $webhook->id));
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
}
|
||||
Log::channel('audit')->info(sprintf('User visits webhook #%d page.', $webhook->id));
|
||||
$subTitle = (string)trans('firefly.show_webhook', ['title' => $webhook->title]);
|
||||
|
||||
return view('webhooks.show', compact('webhook', 'subTitle'));
|
||||
|
Reference in New Issue
Block a user