Permission problem?

Created on 27 July 2023, over 1 year ago
Updated 31 July 2023, over 1 year ago

I created an action-reaction to change the fields value via tamper function. But it works only for admin user and not for others. of course i used the presave state and the fields can be created and edited by other users. I do not understand why....
Thanks for help.

💬 Support request
Status

Fixed

Version

1.1

Component

User interface

Created by

🇮🇹Italy bigtomfelix

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @bigtomfelix
  • 🇩🇪Germany jurgenhaas Gottmadingen

    That sounds strange. Would you mind uploading your exported model for review?

  • 🇮🇹Italy bigtomfelix

    Sure, thank you for your attention.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Thanks for uploading the model. I imported it and it works as expected, both for an admin user as well as a content editor. I've tested with Drupal 10, ECA 1.2.x and a fresh installation based on the standard profile, using the content editor role that comes with that profile. Add the permissions for the content type and all went as expected.

    However, I was surprised, because field_data_pasto is a date field where the other 2 fields are timestamps. But it looks as if the tampering and value assignment still works.

  • 🇮🇹Italy bigtomfelix

    Sorry, I double checked and realized that I had actually only given the user permission to create the content. Only with this permission does it not work. I had to grant them permission to edit its content as well. Adding this permission works (although I don't understand why).
    Thank you very much for your input and patience, which I greatly appreciate.
    As for "field_date_pasto" indeed it is a date field in raw format and I see that tamper works well with timestamp data.

  • Status changed to Fixed over 1 year ago
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Thanks for your feedback, great that we found the source of the issue.

    Adding this permission works (although I don't understand why).

    To set a field value for an entity, ECA verifies that the current user has the following permissions:

    • Update the entity
    • Update the field of that entity

    So, if you had a use case where you could grant those permissions to the given user, you would have to use the Switch user action in your model.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024