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: Streamlined types #122

Merged
merged 2 commits into from
Jul 16, 2021
Merged

feat: Streamlined types #122

merged 2 commits into from
Jul 16, 2021

Conversation

EmperorYP7
Copy link
Member

@EmperorYP7 EmperorYP7 commented Jul 13, 2021

Signed-off-by: Yash Pandey (YP) yash.btech.cs19@iiitranchi.ac.in

Description

This code adds type definitions for accomodating casbin::ABACData within the entirety of the project.

The definitions are as follows:

  • AttributeValue: The type of a value of an attribute
  • Attribute: The type of an attribute containing the name and the value as a std::pair.
  • AttributeVector: Vector of attributes.
  • AttributeList: Initializer list of attributes.
  • AttributeMap: Unordered map containing name and value of the attributes.
  • Data: Type of Data for accomodating ABACData
  • DataVector: Vector of casbin::Data
  • DataList: Initializer list of casbin::Data
  • DataMap: unordered map containing the name and casbin::Data

Noteworthy

The code introduces intrinsic type definitions to casbin. This might affect the overall user-friendliness of the project. However, the type names added here are intuitive and easy to understand, even for a first-time user.

Signed-off-by: Yash Pandey (YP) <yash.btech.cs19@iiitranchi.ac.in>
@EmperorYP7 EmperorYP7 marked this pull request as draft July 13, 2021 07:25
Signed-off-by: Yash Pandey (YP) <yash.btech.cs19@iiitranchi.ac.in>
@EmperorYP7 EmperorYP7 marked this pull request as ready for review July 13, 2021 10:27
@hsluoyz
Copy link
Member

hsluoyz commented Jul 13, 2021

@xcaptain plz review

Copy link

@xcaptain xcaptain left a comment

Choose a reason for hiding this comment

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

LGTM

@hsluoyz hsluoyz merged commit 0fdacfa into casbin:master Jul 16, 2021
@github-actions
Copy link

🎉 This PR is included in version 1.26.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@EmperorYP7 EmperorYP7 deleted the abac branch July 26, 2021 19:27
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.

None yet

3 participants