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 priority support #104

Merged
merged 1 commit into from Sep 15, 2021
Merged

feat: add priority support #104

merged 1 commit into from Sep 15, 2021

Conversation

basakest
Copy link
Contributor

No description provided.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1223880493

  • 0 of 26 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.03%) to 92.302%

Totals Coverage Status
Change from base Build 1217056501: -0.03%
Covered Lines: 1295
Relevant Lines: 1403

💛 - Coveralls

@coveralls
Copy link

coveralls commented Sep 11, 2021

Pull Request Test Coverage Report for Build 1234529942

  • 33 of 33 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 92.491%

Totals Coverage Status
Change from base Build 1217056501: 0.2%
Covered Lines: 1281
Relevant Lines: 1385

💛 - Coveralls

foreach ($this->items['p'] as $ptype => $assertion) {
if ($assertion->tokens[0] != sprintf("%s_priority", $ptype)) {
continue;
}
Copy link
Member

Choose a reason for hiding this comment

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

@basakest The first column is not necessarily the priority column, I think array_search($assertion->tokens, sprintf("%s_priority", $ptype)) can be used here .

});
foreach ($assertion->policy as $i => $policy) {
$assertion->policyMap[implode(',', $policy)] = $i;
}
Copy link
Member

Choose a reason for hiding this comment

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

@basakest Here to be sorted according to the specified priority column, the following addPolicy should also be like this .

feat: add priority support

feat: add priority support
@leeqvip leeqvip merged commit 1eb5fd0 into php-casbin:master Sep 15, 2021
@leeqvip
Copy link
Member

leeqvip commented Sep 15, 2021

🎉 This PR is included in version 3.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@leeqvip leeqvip linked an issue Sep 23, 2021 that may be closed by this pull request
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.

support Priority Explicitly or subjectPriority
3 participants