Rustelo/resources/nickel/rbac/features/content.ncl
Jesús Pérez f1010e9d07
chore: update
2026-07-18 20:16:16 +01:00

28 lines
1.2 KiB
Text

# RBAC — content feature permissions
#
# Covers: content rendering and index endpoints.
# Enable when using rustelo_content.
let E = (import "../rbac-base.ncl").effects in
{
admin = [
{ resource = "endpoint", pattern = "/api/content/*", outcome = "allow", methods = ["GET", "POST", "PUT", "DELETE"], effects = E.audit_allow },
{ resource = "page", pattern = "/admin/content/*", outcome = "allow", methods = [], effects = [] },
],
moderator = [
{ resource = "endpoint", pattern = "/api/content/*", outcome = "allow", methods = ["GET", "POST", "PUT"], effects = E.audit_allow },
{ resource = "page", pattern = "/admin/content/*", outcome = "allow", methods = [], effects = [] },
],
user = [
{ resource = "endpoint", pattern = "/api/content-render/*", outcome = "allow", methods = ["GET"], effects = [] },
{ resource = "endpoint", pattern = "/api/content-index/*", outcome = "allow", methods = ["GET"], effects = [] },
],
guest = [
{ resource = "endpoint", pattern = "/api/content-render/*", outcome = "allow", methods = ["GET"], effects = [] },
{ resource = "endpoint", pattern = "/api/content-index/*", outcome = "allow", methods = ["GET"], effects = [] },
],
}