adding license

This commit is contained in:
Chris Smith
2025-02-23 22:34:05 +01:00
parent 32017babae
commit 2b0ebe8948
9 changed files with 852 additions and 8 deletions

View File

@@ -35,7 +35,7 @@ class SiteController extends Controller
return [
'access' => [
'class' => AccessControl::class,
'only' => ['logout', 'signup', 'webhook'],
'only' => ['logout', 'signup', 'privacy', 'terms'],
'rules' => [
[
'actions' => ['signup'],
@@ -43,9 +43,14 @@ class SiteController extends Controller
'roles' => ['?'],
],
[
'actions' => ['webhook'],
'actions' => ['privacy'],
'allow' => true,
'roles' => ['?'],
'roles' => ['?', '@'],
],
[
'actions' => ['terms'],
'allow' => true,
'roles' => ['?', '@'],
],
[
'actions' => ['logout'],
@@ -58,7 +63,6 @@ class SiteController extends Controller
'class' => VerbFilter::class,
'actions' => [
'logout' => ['post'],
'webhook' => ['post','head'],
],
],
];
@@ -101,6 +105,16 @@ class SiteController extends Controller
return $this->render('index');
}
public function actionPrivacy()
{
return $this->render('privacy');
}
public function actionTerms()
{
return $this->render('terms');
}
/**
* Logs in a user.
*