almasix-orbit-permission
Opinionated Users, Roles, and Permissions UI for Orbit panels, built on almasix-permission.
Register the plugin on a panel. Orbit never auto-discovers plugins.
Install
pip install almasix-orbit-permission
Your user model must mix in HasRoles from almasix-permission, and the permission tables must be migrated.
from almasix.auth import AuthenticatableMixin
from almasix.orm import Model
from almasix.permission import HasRoles
from almasix_orbit_permission import HasOrbitPermissions
class User(HasOrbitPermissions, HasRoles, AuthenticatableMixin, Model):
fillable = ("email", "name", "password")
from almasix.orbit import Panel, PanelRegistry
from almasix_orbit_permission import PermissionPlugin
def register_admin_panel(registry: PanelRegistry) -> Panel:
panel = (
Panel.make("admin")
.path("admin")
.plugin(
PermissionPlugin.make()
.navigation_group("Access")
.generate_on_boot()
)
)
registry.register(panel)
return panel
That adds three resources — Users, Roles, Permissions — plus an Access stats widget on the dashboard.
What you get
- Roles with a checkbox list of abilities (
posts.view_any,posts.create, …) - Permissions as first-class rows (create extras, or let the generator fill them)
- Users with role assignment and optional direct permissions
- Generator that walks the panel’s resources, pages, and widgets and creates matching abilities
- Super-admin role (
super_adminby default) that receives every generated ability - Dashboard widget with user / role / permission counts
Abilities follow Orbit’s existing names: {prefix}.view_any, .view, .create, .update, .delete, plus .restore / .force_delete when the resource uses soft deletes. A resource can declare its own list:
class PostResource(Resource):
@classmethod
def get_permission_prefixes(cls) -> list[str]:
return ["view_any", "view", "create", "update", "delete", "publish"]
Commands
smith orbit-permission:generate admin
smith orbit-permission:super-admin ada@example.com
generate is also available as python -m once the provider is discovered (OrbitPermissionProvider is registered via the almasix.providers entry point).
Options
PermissionPlugin.make()
.navigation_group("Access")
.super_admin_role("super_admin")
.guard("web")
.exclude("RoleResource", "PermissionResource") # skip generating for these
.extra_permissions("impersonate")
.user_model("app.models.user.User")
.generate_on_boot()
.without_widget()
.memory() swaps the ORM for an in-memory store (tests and demos without a database).
Marketplace
Metadata
Release files for almasix-orbit-permission 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| almasix_orbit_permission-0.1.0.tar.gz | 299.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| almasix_orbit_permission-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 318.0 kB
Release files / almasix_orbit_permission-0.1.0.tar.gz
| Download URL | almasix_orbit_permission-0.1.0.tar.gz |
|---|---|
| Size | 299.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d4711107df0d91a8b27806663c241c902c84f45bf55e9452109bbf56a7f5a73
|
|
BLAKE2b-256 checksum How to use checksums |
21ba5679adcea997789a5abf0cc5a17e754d1714178665ab0c5046df740929dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.
Transparency logRelease files / almasix_orbit_permission-0.1.0-py3-none-any.whl
| Download URL | almasix_orbit_permission-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
154e5ad1fd1545c4267d03e37f46c5cb0f35167d009b38e16e27ed5da0b208ca
|
|
BLAKE2b-256 checksum How to use checksums |
b344ab51dbfc1ddca21d912a0d035d9e8d0b82344e8fdc72b58edaf86bc0b00d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.
Transparency log