Umbral
Back to plugin directory
UP

Umbral Permissions

Official by Umbral contributors

RBAC, object checks, REST/admin permission gates

official stable

About

"Can this user do this?" is a question the admin and REST both ask on every request — so answer it once, in a language they already speak. Umbral Permissions is role-based access control wired straight into the framework: groups, per-model view / add / change / delete permissions, and per-object ownership checks for "you may edit your posts, not everyone's". A deactivated account is denied at the permission layer, not just bounced from the login form, so disabling someone actually disables them.

Install

cargo add umbral-permissions

Wire it up

On boot it walks every registered model and provisions the four standard permissions for each.

use umbral::prelude::*;
use umbral_permissions::PermissionsPlugin;

let app = App::builder()
    .database("default", pool)
    .plugin(BlogPlugin::default())          // models to protect
    .plugin(PermissionsPlugin::default())   // provisions their permissions
    .build()?;

Target: editors can publish, authors only draft

Put users in groups, grant the group the model permissions it needs, and both the admin and the REST API enforce it automatically.

What you get

  • Groups + per-model view / add / change / delete permissions
  • Per-object ownership checks ("edit your own rows only")
  • The same checks the admin and umbral-rest already consult
  • Deactivated accounts denied at the permission layer, not just login
  • Auto-provisioned permissions for every registered model

Usage

Mount `PermissionsPlugin::default()` after your model plugins — on boot it provisions the four standard permissions (view/add/change/delete) for every registered model. The admin and umbral-rest consult these checks automatically.

plugin setup
cargo add umbral-permissions

Feature tracker

Per-feature shipping status, recorded in the directory.

6 of 6 shipped
Permission model provisioning shipped Stable

Creates view/add/change/delete permissions for registered models.

Groups and memberships shipped Stable

Group-based RBAC wired to the auth user model.

Route middleware shipped Beta

HTML and API permission-required layers for protected handlers.

REST permission adapter shipped Beta

Codename checks that plug into umbral-rest resources.

Object permission queries usable Beta

Helpers for filtering objects visible to a given identity.

Inactive-user denial shipped Stable

Deactivated users are denied even when a codename matches.

Compatibility

Declared support per Umbral version and database backend.

No compatibility rows declared yet.

Community notes

0 notes in the discussion thread.

No notes yet. Be the first to share how this plugin works for you.

Reported issues

Bugs and abuse reports filed against this plugin.

Report an issue

No open issues

No issues have been reported against this plugin. Track upstream bugs on the maintainer's tracker, or report a directory problem to the Umbral team.