Anonymous Login
2021-05-14 04:16 PDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000764v3.1 ReleaseUser Adminpublic2014-01-25 00:31
Assigned Tocaseydk 
StatusclosedResolutionno change required 
Product Version 
Target VersionFixed in Version3.1 
Summary0000764: Permissions on contacts destroyed when company deleted
If a contact is added through Companies -> Contacts -> add contact
and the company is deleted, without touching the contact
The permissions for even the administrator are destroyed on the contact, and the contact cannot be edited or deleted.
I have not upgraded yet, so I cannot test on new version.
TagsNo tags attached.
Attached Files




caseydk (administrator)

I believe the new version does the same thing.. what do you suggest that it should do?

Would the Contacts switch to "No Company" or should it be impossible to delete the Company in the first place?


sarexpert (reporter)

Good question: I see that the contacts list has an integer field for the company which goes to a key on the companies table.
What happens when someone makes a new contact from the contacts screen and:
1) leaves the company field blank
2) types in a company name that is different than any defined company.

You could leave the contacts in the state of 1) above, or enter the text of the old company name into whatever text field receives the input from 2)

In any case, the permissions need to be set allow deletion or editing of the orphan contacts by anyone.


caseydk (administrator)

1) If they don't select a Company, the id remains zero and no Company-based permissions are applied.

2) If they type a Company that doesn't exist, it defaults to their own Company.

As long as they're attached to a Company, those permissions will be applied. And if there's no matching Company, it's a default deny-all.. as you've found. Therefore, if someone deletes a Company, we have to reset their Company to "none" (contact_company = 0).

Make sense?


sarexpert (reporter)

That should work fine, I guess the problem was that the company was "null" instead of 0?


caseydk (administrator)

No, the problem is that the contact_company keeps the now-deleted Company id.

So when the system says: "can this user see this company?"
the system responds: "that's not a company! what are you talking about!? get out of here!"
and the permissions check denies access.


sarexpert (reporter)

So, I guess that deleting a company will require setting all contacts with that company name to contact_company="0"


caseydk (administrator)

As built now, you can't delete a Company if it has any Contacts attached.

To delete the Company, you must delete or re-assign those Contacts elsewhere.


caseydk (administrator)

Closed for v3.1 Release which occurred 20 January 2014.

-Issue History
Date Modified Username Field Change
2011-04-02 05:38 sarexpert New Issue
2011-04-06 21:57 caseydk Note Added: 0001843
2011-04-09 07:29 sarexpert Note Added: 0001847
2011-04-09 12:16 caseydk Note Added: 0001848
2011-04-09 17:52 sarexpert Note Added: 0001849
2011-04-09 22:12 caseydk Note Added: 0001851
2012-03-18 12:14 sarexpert Note Added: 0002454
2013-11-21 22:37 caseydk Project Pending Requests => v3.1 Release
2013-11-22 05:37 caseydk Note Added: 0003054
2013-11-22 05:37 caseydk Status new => resolved
2013-11-22 05:37 caseydk Resolution open => no change required
2013-11-22 05:37 caseydk Assigned To => caseydk
2014-01-21 17:41 caseydk Note Added: 0003196
2014-01-21 17:41 caseydk Status resolved => closed
2014-01-21 17:49 caseydk Fixed in Version => 3.1
2014-01-25 00:31 caseydk Category General => User Admin
+Issue History