Skip to content

Authorities

Authorities are the finest-grained permissions in Squizy. They are auto-generated by the framework based on your entity model — you do not create them manually.

Generated Authorities

For each @SquizyEntity, Squizy generates the following authorities:

AuthorityDescriptionWrite
{entity}.createCreate new recordsYes
{entity}.readRead recordsNo
{entity}.updateUpdate existing recordsYes
{entity}.deleteDelete recordsYes
{entity}.exportExport data to CSVNo
{entity}.auditView revision historyNo
{entity}.readSensitiveRead fields marked with @SensitiveFieldNo

For example, a Product entity generates: Product.create, Product.read, Product.update, Product.delete, Product.export, Product.audit, Product.readSensitive.

Custom Authorities

The only way to introduce non-standard authorities is through the @SensitiveField annotation with a custom authorityName:

java
@SensitiveField(authorityName = "readOrderCardNumber")
private String cardNumber;

This creates a custom authority (readOrderCardNumber) that must be assigned to roles via the UI, just like any auto-generated authority.

Assigning Authorities

Authorities are not assigned directly to users. Instead, they are grouped into Roles, which are then assigned to users. App Tokens are different — they have authorities assigned directly, without going through roles.

See RBAC for how the resolution works at runtime.