Introduction
Introduction to Security
Overview of access control lists, access levels, entity permissions, and the ownership model.
Role-Based Access Control
Understand roles, role hierarchies, and how they map to permissions.
Access Levels and Ownership
Illustrated walkthrough of how access levels and ownership interact in practice.
Access levels
Access is granted at one of the following levels, ordered from most restrictive to most permissive:| Level | Constant | Description |
|---|---|---|
| User | BASIC_LEVEL | Access to the user’s own records only. |
| Business Unit | LOCAL_LEVEL | Access to all records in the user’s assigned business units. |
| Division | DEEP_LEVEL | Same as Business Unit, plus subordinate units. |
| Organization | GLOBAL_LEVEL | Access to all records within the organization. |
| Global | SYSTEM_LEVEL | Access to all records in the system (Enterprise only). |
Entity permissions
The following permissions can be configured per entity:| Permission | Description |
|---|---|
VIEW | Whether a user can view a record. |
CREATE | Whether a user can create a record. |
EDIT | Whether a user can modify a record. |
DELETE | Whether a user can delete a record. |
ASSIGN | Whether a user can assign a record to another user (evaluated on edit). |
SHARE | Whether a user can share a record with another user (Enterprise only). |
VIEW, EDIT) are also supported.
Configuring permissions for entities
Use thesecurity scope in the #[Config] attribute on an entity class:
#[Config] attribute, run:
Protecting controller actions
- #[Acl] attribute
- YAML configuration
- Action (non-entity)
Apply the
#[Acl] attribute directly to a controller method:Manual access checks
UseisGranted() anywhere in your code:
OroSecurityBundle features
ACL Manager
Programmatically read and modify ACL entries for roles and users.
Field ACL
Control visibility and editability of individual entity fields per role.
Custom Listeners
Implement custom security event listeners for specialized access logic.
Access Rules
Define declarative access rules to restrict data retrieval at the ORM level.
Security Headers
Configure HTTP security response headers (CSP, HSTS, X-Frame-Options, etc.).
CSRF Protection
Enable CSRF token validation for state-changing controller actions.
Custom and configurable permissions
Custom Permissions
Configure and apply custom permissions to an entity beyond the default set.
Configurable Permissions
Define permissions that can be toggled on or off via configuration.
Global View Entities
Mark entities that should always be visible regardless of ownership.