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

Return policy name which allowed in enforce API #260

Closed
wants to merge 2 commits into from

Conversation

Pyav123
Copy link

@Pyav123 Pyav123 commented Apr 29, 2021

No description provided.

@@ -485,7 +490,14 @@ export class CoreEnforcer {
logPrint(reqStr);
}

return res;
if(successReason){
response = { decision : res ,successRule : successReason };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe always return [result, rule] will be a better choice.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, please check

@hsluoyz
Copy link
Member

hsluoyz commented Apr 29, 2021

@Pyav123 @Zxilly I think we already have the enforceEx() API to do this job. Why isn't it used? https://casbin.org/docs/en/management-api#enforceex

@Pyav123
Copy link
Author

Pyav123 commented Apr 29, 2021

@Pyav123 @Zxilly I think we already have the enforceEx() API to do this job. Why isn't it used? https://casbin.org/docs/en/management-api#enforceex

@hsluoyz It is there for php,go,pyton , need same for nodejs

@hsluoyz
Copy link
Member

hsluoyz commented Apr 29, 2021

@Pyav123 fix all checks:

image

@Zxilly Zxilly mentioned this pull request May 13, 2021
@hsluoyz
Copy link
Member

hsluoyz commented May 13, 2021

Replaced by: #271

@hsluoyz hsluoyz closed this May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants