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

Issue 54 casbin mysql adapter #58

Merged
merged 7 commits into from
Jan 24, 2022

Conversation

fanhousanbu
Copy link
Collaborator

Which changes (Bug/Feature):

issue #54

Special notes for reviewers:

由于现存数据库中已经有casbin_rule,所以本次升级,可能需要**手动删除**现有数据库中的casbin_rule表

@colynn
Copy link
Member

colynn commented Jan 23, 2022

@fanhousanbu 因为目前atomci使用的是 beego orm, 不想仅因为 casbin而引入了一个gorm, 或是通过 gorm来读写,但是casbin_rules的表的初始化创建统一交给 beego orm

因为我们即将引入 migrate tools, 多个orm来做初始化的话,对我们而言可能不是一个好的选择;

另外这里有自定义 beego orm casbin adapter, 可以作为参考

Copy link
Member

@colynn colynn left a comment

Choose a reason for hiding this comment

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

/LGTM, thanks @fanhousanbu

@@ -18,13 +18,14 @@ package mycasbin

// CasbinRule ..
type CasbinRule struct {
Copy link
Member

Choose a reason for hiding this comment

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

  1. 是否可以 还是使用beego的orm 来做声明及初始化, gorm仅作为 casbin rules 的读写入口,

  2. 未使用的依赖,是否可以使用go mod tidy后再提交,避免提交很多未使用的vendor文件

@colynn colynn merged commit 7513619 into go-atomci:master Jan 24, 2022
@fanhousanbu fanhousanbu deleted the issue-54-casbin-mysql-adapter branch January 25, 2022 01:09
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.

2 participants