Role references on Record Fluent APIs? #24
-
|
I recently tried to convert role definitions on my menu module records with references to my Role object. Direct references to the object cause the resulting application files have their references as [Object object]. If trying to reference names from the Roles as "role.name" in the Record roles array, this results in the following build error: I went around this defining my roles names separate as constants which can then be referenced in my Role definitions and any Record roles arrays when needed. What is intended way to reference roles on Record Fluent APIs? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Thank you for reporting this issue. I was able to reproduce it and we’re working on a fix. In the meantime, while it's not an ideal workaround, you can set the roles directly since the roles field is of type UserRoles and not a reference type: roles: ['x_example.role1', 'x_example.role2']Please let us know if you have any further questions. |
Beta Was this translation helpful? Give feedback.
Thank you for reporting this issue. I was able to reproduce it and we’re working on a fix.
In the meantime, while it's not an ideal workaround, you can set the roles directly since the roles field is of type UserRoles and not a reference type:
Please let us know if you have any further questions.