Role managmant bug for custom module

Hello all.

I have some bug in role managment for custom module:

2 “type” of users: Sale and Chief
2 roles: Sale - edit and see only own records, Chief - see all, edit - group

Group 1 - 3xSale and one Chief
Group 2 - 3xChief.

Bug: Chief may edit only own records, but when select to “edit - All”, Chief may to edit all records.

Log file, dont write any error.

Some one can help me to fix it, or guide what the problem?