Organization Service Layer
This service handles all database operations related to organizations in the
CommTool system. Organizations are the top-level entities in the multi-tenant
architecture, providing isolation and context for all other objects.
Key concepts:
- Organizations are stored as Type='group' with hierarchie=1
- Each organization has a self-referencing memberSys link
- Organizations can have super admin users for system operations
- Multi-tenant isolation is enforced at the database level
Database tables involved:
- ObjectBase: Core organization records
- Member: Display and search information
- Links: Relationships and membership
- Source:
Members
(static, constant) getAllOrganizations
Get all organizations in the system
Retrieves a complete list of all organizations that are properly initialized
and have the required self-referencing memberSys link. This is used for
system administration, reporting, and multi-tenant operations.
- Source:
(static, constant) getOrganizationsByUIDs
Get organizations by their UIDs
Retrieves organization details for a specific set of organization UIDs.
This is used for batch operations and when you need organization information
for multiple organizations at once.
- Source:
(static, constant) getSuperAdmin
Get super admin user for an organization
Retrieves the system user (super admin) that was created for the organization
during initialization. This user is used for automated operations and system
tasks within the organization's context.
- Source:
(static, constant) initOrga
Initialize a new organization with complete setup
This function delegates to the comprehensive organization initialization
process that creates the organization, system users, permissions, and
all required components for a fully functional multi-tenant environment.
- Source:
(static, constant) updateOrganizationData
Update organization data with property management
This function provides comprehensive organization data management with support
for adding, updating, and removing properties. It handles null values as
deletion indicators and merges changes with existing data.
- Source:
(static, constant) updateOrganizationLogin
Update organization login UID
This function updates the login UID associated with an organization.
The login UID typically represents the keycloak user ID for the organization.
It manages the 'identifyer' link type in the Links table to establish
- Source: