mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2025-12-03 10:33:18 +00:00
fix: Normal user can not change the name of their own address book (#341)
This commit is contained in:
@@ -98,10 +98,10 @@ func (abc *AddressBookCollection) Update(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
u := service.AllService.UserService.CurUser(c)
|
||||
if f.UserId != u.Id {
|
||||
response.Fail(c, 101, response.TranslateMsg(c, "NoAccess"))
|
||||
return
|
||||
}
|
||||
//if f.UserId != u.Id {
|
||||
// response.Fail(c, 101, response.TranslateMsg(c, "NoAccess"))
|
||||
// return
|
||||
//}
|
||||
ex := service.AllService.AddressBookService.CollectionInfoById(f.Id)
|
||||
if ex.Id == 0 {
|
||||
response.Fail(c, 101, response.TranslateMsg(c, "ItemNotFound"))
|
||||
|
||||
Reference in New Issue
Block a user