Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How do I know which rule is in force #1321

Open
zzy2210 opened this issue Sep 28, 2023 · 1 comment
Open

[Question] How do I know which rule is in force #1321

zzy2210 opened this issue Sep 28, 2023 · 1 comment

Comments

@zzy2210
Copy link

zzy2210 commented Sep 28, 2023

Want to prioritize this issue? Try:

issuehunt-to-marktext


What's your scenario? What do you want to achieve?

I use the RBAC model,and the environment is in k8s

i use code like this to open log

	E, err = casbin.NewEnforcer(m, adp)

	E.EnableLog(true)

and when pod initialization succeeds, it print log like :
g : [admin department api] [department user api]

I want to know what policy and group is allowed when my Enforcer returns a pass

like this:

req : user /api/v1/xxxx GET
p [admin api /api/v1/xxxx GET Y]
g [user admin api] 

I looked through the issue and learned that the we had this

e.logger.LogEnforce(expString, rvals, result, logExplains)

Maybe it helps me, but it doesn't actually print

help 😭

@casbin-bot
Copy link
Member

@tangyang9464 @JalinWang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants