How to disable Action Menu while creating custom module (extension) ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ajaypatel
    Junior Member
    • Jun 2015
    • 2

    How to disable Action Menu while creating custom module (extension) ?

    Hi,
    I have created one custom module (extension). Now for this module i need to set custom permission like. Only System User can add, edit and delete the entity data while other user who just logged in the system can just read or see the data. so how can i set this thing in extension by default.
  • tarasm
    Super Moderator
    • Mar 2014
    • 573

    #2
    You can add this possibility in the Controller
    PHP Code:
    public function actionUpdate($params, $data, $request)
    {
        if (!$this->getUser()->isAdmin()) {
            throw new \Espo\Core\Exceptions\Forbidden();
        }
    } 
    
    Job Offers and Requests

    Comment

    • yuri
      Member
      • Mar 2014
      • 8440

      #3
      You can also define Roles in metadata > app.acl
      "solid" section. Set all to no.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      Working...