Purpose
In Wonderful Relations, groups allow for fine-grained access control by defining custom user groups. Unlike the default WordPress roles, which are often too broad, groups in Wonderful Relations enable more specific permissions for applications built within the system.
While WordPress roles primarily determine access within WordPress itself (e.g., Administrator, Editor, Subscriber), groups in Wonderful Relations extend these permissions to application-specific components. This is crucial for cases where users need access to certain templates, buttons, or services without requiring administrative WordPress rights.
For example, in a Wonderful Relations CRM system, groups could be:
- employee – Can view but not modify customer data.
- accounting – Has access to financial records.
- management – Can view and modify high-level reports.
- admin – Has full access to all services.
By using groups, permissions can be cached efficiently, ensuring smooth performance without querying user roles every time.
Visual Example
Scenario: Restricted Dashboard Sections
Imagine a company dashboard where:
- Employees can access general services but not the accounting section.
- Accounting users can access financial services.
- Management users can see both general and financial sections.
Scenario: Button Visibility by Role
- A “Delete” button is only visible to Admins.
- A “Review Submission” button is only accessible to Managers.
Parameters
Title
The display name of the group.
Identifier (unique)
A unique key used internally for programmatic access.
Description
A short description of the group’s purpose.
Components
Groups in Wonderful Relations can be linked to:
- Templates – Control access to specific templates in the system.
- Buttons – Restrict button visibility based on group membership.
- Services – Define which users can access API endpoints or backend services.
Conclusion
Groups in Wonderful Relations provide a flexible and efficient way to manage permissions beyond standard WordPress roles. By linking groups from buttons, templates, and services, you can fine-tune access control for any application scenario.
🚀 Now, permissions are as flexible as your application’s needs!