Closed
Document custom domain parameter naming in RBAC with domains#433
Conversation
|
|
✅ Deploy Preview for casbin ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update documentation based on PR 1611
Document custom domain parameter naming in RBAC with domains
Jan 1, 2026
hsluoyz
marked this pull request as ready for review
January 1, 2026 16:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR apache/casbin#1611 fixed a bug where renaming the domain parameter from
domto arbitrary names (e.g.,tenant,organization) caused enforcement failures. This adds documentation for that fix.Changes
docs/RBACWithDomains.mdx: Added "Custom Domain Parameter Names" section explaining that any parameter name works seamlessly, with
SetFieldIndex()only required for non-standard positionsdocs/SyntaxForModels.mdx: Added "Domain Parameters in Matchers" subsection showing automatic domain token detection
Example
Users can now freely use custom domain names:
Casbin automatically detects the domain parameter regardless of name.
SetFieldIndex()is only needed when placing the domain parameter in a non-standard position (not second).Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.