DocsPermissions & hooks · FRL
On this page

Apply ownership rules

Protect public submissions, owner updates and admin actions.

Before you begin: Protect record actions.

Public Submissions

For public forms, require the fields that prove the request is complete enough to accept.

backend/index.frl
Rule input (JSON)

Use a complete version 2 rule file. Select a post with “postType” and “action”, or an “endpoint” by name. Saved data, jobs, payments and email need the local server. Dedupe replay protection also needs a site.

Check complete rules or run schemas, permissions, hooks and calculations against the input above. Add excerpts to a complete rule before running.

The schema enforces exact field shape. The create allow rule adds an authorization rule for the public action.

Use $action.where when a list should only be available for a specific requested target:

backend/index.frl
Rule input (JSON)

Use a complete version 2 rule file. Select a post with “postType” and “action”, or an “endpoint” by name. Saved data, jobs, payments and email need the local server. Dedupe replay protection also needs a site.

Check complete rules or run schemas, permissions, hooks and calculations against the input above. Add excerpts to a complete rule before running.

$action.where reflects the where values the theme requested. It is useful for checking access before Frontbacked loads list rows.

Owner-Only Updates

For user-generated content, compare the signed-in user with a trusted stored owner value. If ownership is stored inside post data, protect that field with immutable.

backend/index.frl
Rule input (JSON)

Use a complete version 2 rule file. Select a post with “postType” and “action”, or an “endpoint” by name. Saved data, jobs, payments and email need the local server. Dedupe replay protection also needs a site.

Check complete rules or run schemas, permissions, hooks and calculations against the input above. Add excerpts to a complete rule before running.

Pair owner checks with immutable schema fields so an update cannot move content to another author or parent record.

Site Admin Actions

For site-admin dashboards, catalog management, settings-like content, and other theme-owned data, use $admin helpers scoped to the post type being managed.

backend/index.frl
Rule input (JSON)

Use a complete version 2 rule file. Select a post with “postType” and “action”, or an “endpoint” by name. Saved data, jobs, payments and email need the local server. Dedupe replay protection also needs a site.

Check complete rules or run schemas, permissions, hooks and calculations against the input above. Add excerpts to a complete rule before running.

Continue with Protect private data and edits.