Skip to main content

Module rbac

Module rbac 

Source
Available on crate feature rbac only.
Expand description

Role-based access control for SeaORM (rbac feature).

Authorises connections at the SQL level: the RbacEngine reads permissions out of dedicated database tables, attaches them to a DatabaseConnection (producing a RestrictedConnection), and then every query / mutation is checked against the user’s roles before being sent to the database.

See the Role Based Access Control blog post for an end-to-end walkthrough.

Re-exports§

pub use entity::user::UserId as RbacUserId;
pub use context::*;

Modules§

context
entity
schema

Structs§

Action
PermissionRequest
RbacEngine
RbacSnapshot
RbacUserRolePermissions
ResourceRequest
SchemaTable
Table

Enums§

AccessType
RbacError
An error from unsuccessful database operations
SchemaOper
Schema Operation

Constants§

WILDCARD
Wildcard token ("*") accepted by RBAC tables to mean “any permission” or “any resource”.

Type Aliases§

RbacPermissionsByResources
RbacResourcesAndPermissions
RbacRoleHierarchyList
RbacRolesAndRanks