use the original record id in the update manage rule checks
This commit is contained in:
parent
1e2a923433
commit
dadbca5248
|
@ -453,7 +453,8 @@ func recordUpdate(optFinalizer func(data any) error) func(e *core.RequestEvent)
|
|||
form.SetRecord(e.Record)
|
||||
|
||||
manageRuleQuery := e.App.DB().Select("(1)").From(e.Collection.Name).AndWhere(dbx.HashExp{
|
||||
e.Collection.Name + ".id": e.Record.Id,
|
||||
// note: use the original record id and not e.Record.Id because the record validations because may get overwritten
|
||||
e.Collection.Name + ".id": e.Record.LastSavedPK(),
|
||||
})
|
||||
if !form.HasManageAccess() &&
|
||||
hasAuthManageAccess(e.App, requestInfo, e.Collection, manageRuleQuery) {
|
||||
|
|
Loading…
Reference in New Issue