Company groups – system description

Tables of the company group master, content filtering of the list, company assignment endpoints and reference-protected deletion.

Master of company groups (client groups) and assignment of companies to them. A company is linked through its company_group_id field; finalised module.

Data model

Table names carry the installation's own prefix in the database.

TableRole
company_group, company_group_descriptiongroup, name per language, order
companycompany_group_id holds the assignment
permission_scopecontent right

Process

  1. List: paged and sorted; filtered to the allowed groups (getAllowedCompanyGroupIds).
  2. Save: name per language required; addCompanyGroup() / editCompanyGroup(); returns company_group_id.
  3. Assignment: companysearch (name/tax number, max. 15), companyadd, companyremove – sets the company's group id or resets it to 0 (setCompanyGroup).
  4. Delete: if the group has companies (getTotalCompaniesByCompanyGroupId) it refuses and shows the count; otherwise deleteCompanyGroup().

Permissions

  • Function rights: list, add (not in the catalogue; header button, canSave), edit, assign_company, delete, debug.

Known limitations

  • Saving an existing group does not check the group's scope.
  • The company search and assignment do not check content scope: any company can be reached.
Related topics: company group permissions