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

feat: add support for add_domain_matching_function #165

Merged
merged 6 commits into from
Jun 27, 2021
Merged

feat: add support for add_domain_matching_function #165

merged 6 commits into from
Jun 27, 2021

Conversation

Zxilly
Copy link
Contributor

@Zxilly Zxilly commented Jun 8, 2021

resolve: #161

Signed-off-by: Zxilly zhouxinyu1001@gmail.com

@Zxilly
Copy link
Contributor Author

Zxilly commented Jun 8, 2021

@hsluoyz @techoner plz review

@hsluoyz
Copy link
Member

hsluoyz commented Jun 10, 2021

@dhait plz review.

Copy link
Member

@leeqvip leeqvip left a comment

Choose a reason for hiding this comment

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

if self.matching_func is None:
return name in self.all_roles.keys()
def has_role(self, role):

Copy link
Member

Choose a reason for hiding this comment

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

Please remove has_role() create_role(),refer to RoleManager .

@Zxilly
Copy link
Contributor Author

Zxilly commented Jun 15, 2021

@techoner I believe Go implementation may have potential security problem. refer to: casbin/casbin-website#221 (comment).
So I implement it according to Casbin.NET implementation.

@leeqvip
Copy link
Member

leeqvip commented Jun 19, 2021

@Zxilly Please fix the conflict.

@Zxilly
Copy link
Contributor Author

Zxilly commented Jun 19, 2021

@techoner working on this. A style PR make lots of conflict.

Signed-off-by: Zxilly <zhouxinyu1001@gmail.com>
Signed-off-by: Zxilly <zhouxinyu1001@gmail.com>
Signed-off-by: Zxilly <zhouxinyu1001@gmail.com>
Signed-off-by: Zxilly <zhouxinyu1001@gmail.com>
Signed-off-by: Zxilly <zhouxinyu1001@gmail.com>
Signed-off-by: Zxilly <zhouxinyu1001@gmail.com>
@Zxilly Zxilly requested a review from leeqvip June 27, 2021 08:38
@Zxilly
Copy link
Contributor Author

Zxilly commented Jun 27, 2021

@techoner Plz review

@hsluoyz
Copy link
Member

hsluoyz commented Jun 27, 2021

@Zxilly plz fix:

image

@leeqvip leeqvip merged commit 19b9503 into casbin:master Jun 27, 2021
github-actions bot pushed a commit that referenced this pull request Jun 27, 2021
# [1.2.0](v1.1.3...v1.2.0) (2021-06-27)

### Features

* add support for add_domain_matching_function ([#165](#165)) ([19b9503](19b9503))
@github-actions
Copy link

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

rbac_with_domain_pattern -- not implemented?
3 participants