mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-22 18:25:47 +08:00
feat: fix update application failed for permissions with the same name (#2579)
* fixed: update application failed where have two same permission in different organization * Update application.go --------- Co-authored-by: hsluoyz <hsluoyz@qq.com>
This commit is contained in:
parent
077a1cb8b7
commit
524cf4dda5
@ -664,7 +664,7 @@ func applicationChangeTrigger(oldName string, newName string) error {
|
||||
}
|
||||
}
|
||||
permissions[i].Resources = permissionResoureces
|
||||
_, err = session.Where("name=?", permissions[i].Name).Update(permissions[i])
|
||||
_, err = session.Where("owner=?", permissions[i].Owner).Where("name=?", permissions[i].Name).Update(permissions[i])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user