I'm having a hard time trying to figure out how permissions work. Giving users security roles in DNN like edit module/page just to be able to edit app data doesn't work for me.
I need to give users strict permissions to add or edit any data on the view/content in that app/module, but they cannot have edit permissions to the page or the module itself (only the data in it, like FnL allows).
Basically, the content tool bars or list tool bars should be visible to some select DNN users with no security access (more like a social group).
2sxc Designers group is not possible. Way too many groups with different accesses to different apps.
Custom toolbars do not seem to render... I used
<ul class="sc-menu" toolbar='{"contentType":"farm_ad","action":"new"}'></ul>
and I can see the code in the page source, but the button itself is not rendered for non admins.
I tried giving full permissions to the content and view to everyone (security level: view permissions and even anonymous), but the buttons do not show...
I'm trying this code:
@Dnn.User.IsInRole("Editores de fármacos")<br>
@if (@Dnn.User.IsInRole("Editores de fármacos") == true)
{
<div class="sc-element">
<h1>Fármacos adulto</h1>
@Edit.Toolbar(ListContent)
</div>
<br>
<ul class="sc-menu" toolbar='{"contentType":"farm_ad","action":"new"}'></ul>
<br>
}
And I can see the if clause returns true (the h1 is rendered), but toolbar and buttons simply do not show...
So to start - I would recommend to only use one toolbar-api, to keep things simple. As you're using Razor, I recommend you use that, also because you'll get errors when you use an incorrect syntax. So best to use @Edit.Toolbar(...)
There are always a few questions to ask, if the toolbar doesn't appear:
@Edit.Toolbar()
without parameters, to just get a minimal toolbar which provides app/manage buttons but no edit. Depending on the core issue, you'll have different solutions.
if
or something is preventing the output.