Skip to content

feat: Support Casbin UpdatableAdapter interface #15

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

Merged
merged 1 commit into from
Sep 26, 2021

Conversation

basakest
Copy link
Contributor

No description provided.

@hsluoyz
Copy link
Member

hsluoyz commented Sep 23, 2021

@techoner plz review

src/Adapter.php Outdated
$removedRule = $removedRule->toArray();
$removedRule = array_filter($removedRule, function ($value) {
return !is_null($value) && $value !== '';
});
Copy link
Member

Choose a reason for hiding this comment

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

$this->addPolicies($sec, $ptype, $newRules);
$transaction->commit();
} catch (\Exception $e) {
$transaction->rollBack();
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 exception should not be ignored here, same as updatePolicies().

feat: Support Casbin UpdatableAdapter interface

feat: Support Casbin UpdatableAdapter interface
@leeqvip leeqvip merged commit 1b5fed5 into php-casbin:master Sep 26, 2021
@leeqvip
Copy link
Member

leeqvip commented Sep 26, 2021

🎉 This PR is included in version 1.5.0 🎉

The release is available on GitHub release

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.

3 participants