# Security group assigned but not working

**URL:** <https://community.spicecrm.io/t/security-group-assigned-but-not-working/251>\
**Category:** Uncategorized\
**Created:** [February 12, 2018, 6:43pm UTC](https://community.spicecrm.io/t/security-group-assigned-but-not-working/251 "2018-02-12T18:43:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pat](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Pat](https://community.spicecrm.io/u/Pat)\
**Post date:** [February 12, 2018, 6:43pm UTC](https://community.spicecrm.io/t/security-group-assigned-but-not-working/251/1 "2018-02-12T18:43:35Z")

</div>

Hi,

We’re using Security Suite and we don’t know why but there are some records from a custom module that should have a security group assigned, because in the security suite subpanel that appears in the detail view of the record we can see it, but the record doesn’t appear in the _securitygroups\_records_ table and so users who belong to that security group can’t access this record.

The Security Suite configuration is:

- Additive Rights: Yes
- New User Group Popup: Yes
- User Role Precedence: Yes
- Inherit from Parent Record: Yes  
The other options are not marked.

Does anyone know what is happening and how to solve it?

Thanks in advance,

Pat

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [February 12, 2018, 7:00pm UTC](https://community.spicecrm.io/t/security-group-assigned-but-not-working/251/2 "2018-02-12T19:00:09Z")

</div>

Pat,

did you check sugarcrm.log on errors caused by securitygroups queries?

Val

---

<div class="post-metadata">

**Author:** ![Pat](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Pat](https://community.spicecrm.io/u/Pat)\
**Post date:** [February 12, 2018, 7:46pm UTC](https://community.spicecrm.io/t/security-group-assigned-but-not-working/251/3 "2018-02-12T19:46:43Z")

</div>

Hi Val,

I have checked sugarcrm.log after trying to access the record from the user that can’t see it and also after re-assigning the record to the security group, but I don’t see any errors on the log related to securitygroups queries. I can paste here some queries from the log related to securitygroups if you want, but they are a bit complex.

Should I do any other action to get something in the log that can enlight us?

Thanks in advance,

Pat

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [February 12, 2018, 8:08pm UTC](https://community.spicecrm.io/t/security-group-assigned-but-not-working/251/4 "2018-02-12T20:08:25Z")

</div>

Pat,  
Let me check if I understood the problem correctly:  
Your module is under ACL control (=\> you did a repair role after adding the module to your CRM)  
The module knows about SecurityGroups since the SecurityGroups subpanel appears in DetailView.  
Some of the records do not display any securitygroups entries in this subpanel.  
You noticed that these records do not show up in securitygroups\_records tabel.

When/How are SecurityGroups assgined to your module record?

And which CRM in which version do you have in use?

Val

---

<div class="post-metadata">

**Author:** ![Pat](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Pat](https://community.spicecrm.io/u/Pat)\
**Post date:** [February 23, 2018, 11:44am UTC](https://community.spicecrm.io/t/security-group-assigned-but-not-working/251/5 "2018-02-23T11:44:57Z")

</div>

Hi Val,

Finally we found that the problem was that when installing Security Suite in a custom module, we edited the custom/metadata file related to the relationship Security Suite - custom module in a wrong way. We put our custom module as the lhs\_module instead of placing it as the rhs\_module. That was the reason why records were stored in the database in a bad way (record\_id and securitygroup\_id were turned in securitygroups\_records table) and so the groups we were seeing in Security groups subpanel in the detail view of the record were not really assigned.

Thanks for your help 🙂

Pat

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [February 26, 2018, 4:10pm UTC](https://community.spicecrm.io/t/security-group-assigned-but-not-working/251/6 "2018-02-26T16:10:30Z")

</div>

Great, thank you for sharing.
