优化
This commit is contained in:
@@ -34,7 +34,7 @@ func newPolicyRule(authorityID uint, path, method string) casbinRulePO {
|
||||
}
|
||||
|
||||
func policyScope(db *gorm.DB) *gorm.DB {
|
||||
return db.Where("ptype = ?", "p")
|
||||
return db.Session(&gorm.Session{NewDB: true}).Model(&casbinRulePO{}).Where("ptype = ?", "p")
|
||||
}
|
||||
|
||||
func deletePoliciesForAuthority(db *gorm.DB, authorityID uint) error {
|
||||
|
||||
Reference in New Issue
Block a user