AnsweredAssumed Answered

Regular Users "  ...  do not have access  ... " but Admin does in CE for Custom Modules

Question asked by Ramblin Ramblin on Apr 15, 2014
Latest reply on May 26, 2015 by Babak Saadatmandi
I just came across a perplexing issue with a stock SugarCRM CE 6.5.16, and when I searched the forums, others have had a problem since v5, but the explanations were not clear so after solving the issue, I wanted to share with you.

I created a custom module and installed it on an installation.  There were no other add-on modules installed.

When I went in to the new module as Admin, no problem.

When I went in as a Regular User, I got the error message
"You do not have access to this area. Contact your site administrator to obtain access.".

I tried multiple Admins and multiple Regular users with the same result.

Since CE does NOT have Access control by role, I did not see how that could be an issue but the posts kept pointing to that.

Well, as it turns out, it was due to me installing, then uninstalling then re-installing the custom module.

On the initial install, in the MySQL database in the acl_actions table, the access permissions for the new module were properly set.

On the uninstall, the access permissions for the module were set to Deleted.

On the reinstall, the access permissions were NOT reinstated so were left as Deleted.
(I would say this is a bug but not sure what Sugar's view of this is)

So, to make it all work as intended, I went into the acl_actions table and found all (8) entries where the Category was the name of my module and changed the Deleted=1 to Deleted=0 and saved the changes.

I did a Repair->Rebuild Roles and a Repair -> Repair and Rebuild (not even sure you need this but I always do after a change).

I then logged out of my CRM, restarted the browser (to clear the cache) and logged back in and all was good.

Hope this helps someone else.



Outcomes