mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 19:40:19 +08:00
feat: en/decodeURI in permission/role name (#2137)
This commit is contained in:
@ -112,7 +112,7 @@ func getPermission(owner string, name string) (*Permission, error) {
|
||||
}
|
||||
|
||||
func GetPermission(id string) (*Permission, error) {
|
||||
owner, name := util.GetOwnerAndNameFromId(id)
|
||||
owner, name := util.GetOwnerAndNameFromIdNoCheck(id)
|
||||
return getPermission(owner, name)
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ func UpdatePermission(id string, permission *Permission) (bool, error) {
|
||||
return false, err
|
||||
}
|
||||
|
||||
owner, name := util.GetOwnerAndNameFromId(id)
|
||||
owner, name := util.GetOwnerAndNameFromIdNoCheck(id)
|
||||
oldPermission, err := getPermission(owner, name)
|
||||
if oldPermission == nil {
|
||||
return false, nil
|
||||
|
Reference in New Issue
Block a user