Access to creating a new object


I have a question about the rights of a user to create a new entity type.

At the moment, our users can create the same entity in two ways: in the editor (create_child_entity) and via the ‘+ create new object’ button. Unfortunately, this is not what we want. We only want the users to create an entity via the editor (create_child_entity). Thus, we want the ‘+ create new object’ button to be grey, so that they cannot use it.

I tried to change the rights of the users of that entity type to ‘Read’. When I did that, the button ‘+ create new object’ was grey, but unfortunately it was also not possible to create a this entity in our editor.

So my question is: is it possible to let the ‘+ create new object’ button be grey and simultaneously to be able to create the same entity type in the editor?

Kind regards,

Colin Groen

Hi Colin,

You can bypass user access restrictions in the code with the privileged flag. In the documentation you can find how to implement this in your code: Share data between entities using the API | VIKTOR Documentation