{"modulePath":"github.com/GoCodeAlone/workflow","version":"v0.66.0","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package rbac\n\n## Types\n\n```go\ntype BuiltinProvider struct {\n\t// contains filtered or unexported fields\n}\n```\nBuiltinProvider wraps the existing PolicyEngine to implement PermissionProvider.\n\n```go\nfunc NewBuiltinProvider(engine *coreRBAC.PolicyEngine) *BuiltinProvider\n```\nNewBuiltinProvider creates a BuiltinProvider backed by the given PolicyEngine.\n\n```go\nfunc (b *BuiltinProvider) CheckPermission(_ context.Context, subject, resource, action string) (bool, error)\n```\nCheckPermission maps the PermissionProvider interface to PolicyEngine.Allowed. The subject is treated as a role name.\n\n```go\nfunc (b *BuiltinProvider) ListPermissions(_ context.Context, subject string) ([]auth.Permission, error)\n```\nListPermissions returns all permissions for the given role.\n\n```go\nfunc (b *BuiltinProvider) Name() string\n```\nName returns the provider identifier.\n\n```go\nfunc (b *BuiltinProvider) SyncRoles(_ context.Context, roles []auth.RoleDefinition) error\n```\nSyncRoles registers role definitions in the underlying PolicyEngine. This allows dynamic role creation beyond the 4 built-in roles.\n\n","path":"github.com/GoCodeAlone/workflow/plugin/rbac","name":"rbac","synopsis":"","isRedistributable":true}
