Skip to content

Commit

Permalink
company fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Praesidiarius committed Apr 1, 2021
1 parent 64a9568 commit 1329a39
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Controller/ContactController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ public function __construct(AdapterInterface $oDbAdapter,ContactTable $oTableGat
public function indexAction() {
# You can just use the default function and customize it via hooks
# or replace the entire function if you need more customization
return $this->generateIndexView('contact');
if(CoreEntityController::$oSession->oUser->hasPermission('admin', 'OnePlace-Contact-Controller-ContactController')) {
return $this->generateIndexView('contact');
} else {
return $this->generateIndexView('contact', [], ['created_by' => CoreEntityController::$oSession->oUser->getID()]);
}
}

/**
Expand Down

0 comments on commit 1329a39

Please sign in to comment.