feat: add NetBox plugin store
CI / php-store (push) Canceled after 0s
CI / python-components (push) Canceled after 0s

This commit is contained in:
MrBlake committed 2026-08-24 20:51:25 +02:00
commit f36d6be511
135 files changed
+15160

No files matched your search

@@ -0,0 +1,18 @@
from __future__ import annotations
from typing import Protocol
class PermissionUser(Protocol):
is_authenticated: bool
is_superuser: bool
def has_perm(self, permission_name: str) -> bool: ...
def has_store_access(user: PermissionUser, permission_name: str) -> bool:
"""Authorize NetBox users without relying on the removed ``is_staff`` field."""
return bool(
user.is_authenticated
and (user.is_superuser or user.has_perm(permission_name))
)