Only admins can see new Dashboard

This commit is contained in:
Frank Schubert
2024-01-10 21:29:01 +01:00
parent 1bc9e85cc6
commit 3611372669
3 changed files with 187 additions and 139 deletions
@@ -23,18 +23,18 @@ class DashboardController extends mfBaseController {
$newss = NewsModel::getAll();
$this->layout()->set("newss", $newss);
if($this->me->is(["Admin", "netowner", "salespartner"]) || $this->me->can("Preorder")) {
//if($this->me->is(["Admin", "netowner", "salespartner"]) || $this->me->can("Preorder")) {
if($this->me->is("Admin")) {
return $this->dashboardAction();
}
}
protected function dashboardAction() {
$this->layout()->setTemplate("Dashboard/Dashboard");
$r = $this->request;
$campaign_ids = $r->campaign_id;
if($campaign_ids && !is_array($campaign_ids)) {
$campaign_ids = [$campaign_ids];