I think with some logic in the skin it's doable. Insert a class when a user is not an admin, but has page edit right and add.
.IsEditor #personabar-wrap{ display:none !important; }
Ok, I did a quick test, you need:
.personalBarContainer{ display:none !important; }
#Body{ margin-left:0 !important; }
I don't have time to test right now, but my first idea would be:
DotNetNuke.Entities.Portals.PortalSettings.Mode.Edit = true
DotNetNuke.Security.Permissions.TabPermissionController.CanManagePage = false
Or DotNetNuke.Security.Permissions.TabPermissionController.CanAddContentToPage
I'm curious if that would help as I could then add this option to our style helper
(A class if the user is a Module Administrator)
Looks like this topic came up in a few places and 1 of them resulted in Aaron Lopez of Wolf X Machina adding a quick blog about it.
>> Hide the PersonaBar from a Role in DNN
Two quick things to note,
1. Aaron's is in VB, if your skin is C# (<%@ Control Language="C#" ...), then here is the improved version to include in your (.ascx) file:
<% if(DotNetNuke.Security.PortalSecurity.IsInRole("Content Editors")) { %> <style type="text css=""><br /> #Body { margin-left: 0 !important; } .personalBarContainer, .personaBarContainer { display: none !important; } <% } %>
2. I added the CSS !important since for many situations, those are prolly needed and I also included the correctly spelled class ("persona" not "personal" (with the "L")) because DNN may fix a mistake like that someday (or not).
Cheers!
- Accuraty/Jeremy
These Forums are dedicated to the discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.