Attribute Access Rules/Handlers introduce an error during entity creation

Hello,

I’ve prepared an example to demonstrate an error we came across recently.
Steps to reproduce:

  1. Start application.
  2. Set cuba.useSpringApplicationEventsToSetupAttributeAccess to false. If you curious about Spring-based old style Rules - the same is the case with them as well.
  3. Open Application->As screen
  4. Create a new A
  5. Enter any values
  6. Press Save button
  7. Modify name field
  8. Try to save entity again. Here you get the error Access if forbidden or something to that effect – since the entity doesn’t have a security token.

Regards,
Ilia.

PS Actually I wonder what’s the reason security tokens are loaded for entities in the main editor datasource and it’s nested ones, but aren’t loaded for other datasources?

https://github.com/wrover/attribute-access-errors

Hello,
got the same error again.
How to refresh a ds to load an entity with a securityToken?

Regards,
Ilia.

Thank you for reporting the problem. We have created an issue https://youtrack.cuba-platform.com/issue/PL-10705. Issue is scheduled for the next bug fix release 6.8.

1 Like