Skip to content

Updating and creating entries in one request fails #278

@nilshoerrmann

Description

@nilshoerrmann

We've got a form where members administer a list of song titles. This list works similar to the Duplicator interface in the backend: members can add and remove items or edit existing items. Each item is stored as an entry in an associated section. All members are allowed to create new and edit own entries.

bildschirmfoto am 2016-07-06 um 16 15 58

  • This works just fine when the user creates a first song entry.
  • It also works fine when the user updates existing song entries.
  • It doesn't work when the user updates an existing song but also adds a new one.

The last case results in a permission error:

You are not authorised to perform this action.

It seems like Members sets the action for both items to edit although it should be edit for one and create for the other. Because the new item does not exist yet (that's why it's new, hum) and thus is not yet connected to the current member's id, the required access level is set to 2 (which means "edit all" I guess). At least everything works just fine, when I set the permissions to edit all.

Any ideas how to solve this issue?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions