Menu item Create object visible by a role that is not listed in the user roles

Hi all,  As said in the title, I have a problem when I want to hide for one role a "create object" action from a menu item. This action goes to a page that is normally not visible for this role, and the creation of those type of objects by the "New" button in the Overview page is also not available for this role, that is why he doesn't appear in the User role list of the menu item. So everything should work perfectly . However, when I launch the app and connect with this role, the item menu appear. I don't understand why.  Could you help me with that ?   PS : I also take the opportunity to ask about the custom.css file of my project. Strangely, when I run my app, the compilation erases its content to replace it by the default comment : "/ *# */ ". Is there a way to avoid this automatic action by the modeler ? I didn't have this problem in the older versions (I work now on the 7.21.0-which by the way is not listed below).    Thank you all for your help !
6 answers

Hi Dan,

I would suggest creating a microflow and apply specific user roles to that microflow which allow the creation of the object. The add that microflow to the navigation. 

I believe that the navigation isn't checking whether an user role is able to create an object or not. It only checkes whether is has access to the object.

Hope this helps.




Let me first answer your css question.

you should never edit the custom.css file as it will be overwritten (you figured this out on your own). You should work on the custom.scss file (or a file imported there) and compile it using gulp.


To your initial question:

Has this user the entity right to create objects of this entity?


For your P.S.: the css will be overwritten because all style changes must be done in the related sass file. There is a Learning path about that topic, if you are interested in more details.


For the CSS problem, I finally found from where it happened. 

I was editing the file inside "MyProject\deployment\web\styles\css\custom\custom_save.css" instead of the one in "MyProject\theme\styles\css\custom". 

Now it works perfectly, even if I just modify the custom.css file. But thank you both for the informations about scss and sass.



I managed to find the "Allow to create objects" option, and desactivated it for the role that shouldn't see the menu that creates it. 

Now when I connect with this role, I can still see the menu but when I click on it, an error message appears : 

"Creating object of type LeadpointCrossSellingTool.Company failed for security reasons".

How should I do for the menu item not to be displayed at all for him ? 

Thank you in advance.