Allow Edit for admin in circle
This commit is contained in:
parent
bafc519150
commit
3919429f77
4 changed files with 16 additions and 5 deletions
|
@ -427,7 +427,7 @@ func (h *Handler) editChore(c *gin.Context) {
|
|||
})
|
||||
return
|
||||
}
|
||||
if currentUser.ID != oldChore.CreatedBy {
|
||||
if !oldChore.CanEdit(currentUser.ID, circleUsers) {
|
||||
c.JSON(403, gin.H{
|
||||
"error": "You are not allowed to edit this chore",
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue