mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-01 10:00:19 +08:00
feat: save policy in adapter edit page (#2190)
* fix: save policy in adapter * fix: disable edit for builtin adapter
This commit is contained in:
@ -25,5 +25,12 @@ func CasbinToSlice(casbinRule xormadapter.CasbinRule) []string {
|
||||
casbinRule.V4,
|
||||
casbinRule.V5,
|
||||
}
|
||||
// remove empty strings from end, for update model policy map
|
||||
for i := len(s) - 1; i >= 0; i-- {
|
||||
if s[i] != "" {
|
||||
s = s[:i+1]
|
||||
break
|
||||
}
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
Reference in New Issue
Block a user