feat: make hard-coded authz adapter editable, rename adapter to ormer (#2149)

* refactor: rename casbinAdapter to casdoorAdapter

* feat: add initEnforcer

* fix: router

* refactor: make hard-coded code configurable

* fix: data type

* feat: support sqlite3

* feat: disable delete and edit name for built in resources

* feat: optimize code

* fix: init

* fix: e2e

* fix: remove datasourcename

* fix: revert rename

* refactor: change all ORM's Adatper to Ormer

* refactor: name
This commit is contained in:
Yaodong Yu
2023-07-29 15:07:04 +08:00
committed by GitHub
parent 74b058aa3f
commit ea10f8e615
56 changed files with 1314 additions and 1031 deletions

View File

@ -21,7 +21,7 @@ type Affiliation struct {
func (syncer *Syncer) getAffiliations() ([]*Affiliation, error) {
affiliations := []*Affiliation{}
err := syncer.Adapter.Engine.Table(syncer.AffiliationTable).Asc("id").Find(&affiliations)
err := syncer.Ormer.Engine.Table(syncer.AffiliationTable).Asc("id").Find(&affiliations)
if err != nil {
return nil, err
}