How to disable quick create menu entry for a specific module in mobile view ?

hi,

i've have to disable create for account in mobile view only.

i'already set an ACL wich works great. but i see, it remains create button in subpanel and quick create menu.

how can i do to remove them in mobile view ?

Parents Reply Children
  • unfortunately it's not the mobile app, but  sugar /mobile view



    sorry for not been clear

  • i solved my problem by overriding the enforceModuleACLs() function from CurrentUserApi like this : 

    custom/clients/mobile/api/CustomCurrentUserMobileApi.php

    /**
         * Enforces module specific ACLs for mobile
         *
         * @param  array $acls
         * @return array
         */
        protected function enforceModuleACLs(Array $acls)
        {
            $readOnlyModules = ['Accounts'];
    
            foreach ($acls as $modName => $modAcls) {
                if (in_array($modName, $readOnlyModules)) {
                    $acls[$modName]['edit'] = 'no';
                    $acls[$modName]['massupdate'] = 'no';
                    $acls[$modName]['create'] = 'no';
                }
            }
    
            return $acls;
        }


    but i don't understand, why the first ACL i've made on Account which denied action edit,save in checkAccesFunction allows mobile view to display "create button" in some case.



    what is the difference between acl ( SugarACLStrategy ) and $ACL in my function enforceModuleACLs. Slight smile