Hinterlasse einen Kommentar

DNN: Allow Non-Admins to do Page Management

In DNN 5.0 the artificial differences between Regular and Admin pages was removed. All Modules showed in the Admin-Menu can now also be placed on any custom page and basically everyone could use them. This article gives you instructions how to allow Non-Admins to access the DNN Page Management and workaround some limitations.

Erik Van Ballegoij already wrote about how to give non admins access to any admin page. You can just insert the module like any other to a desired Page. It’s important to give the desired user(s) Edit Permission on that Page (not just on that module) otherwise they get an “Access Denied” warning.

Basically that’s it. Users can now edit Page settings for Pages they have edit Permissions to but for no other Pages. There are just two limitations:

  1. Drag and drop to reorder Pages only works for Administrators
  2. Add Page(s) only works for Administrators

To get these functionality to work for Non-Administrators adapt the file at ~/DesktopModules/Admin/Tabs/Tabs.ascx.cs. You’d need to comment out a Security check PortalSecurity.IsInRole(PortalSettings.AdministratorRoleName) 3 times:

  1. OnInit: comment out the if-Condition (line ~237) and the else statement (~243-247)
  2. CtlPagesNodeDrop: comment out the if-Condition (first line)
  3. OnCreatePagesClick: comment out the if-Statement (first two lines)

That’s it. I tested it successfully on DNN 7.3.1.

Werbung

Über Benjamin Freitag

Web Developer bei 2sic Internet Solutions GmbH seit 2006. Entwickelt Software-Lösungen mit Web-Standards und Microsoft-Technologien. Mein Daily Business: SharePoint, DNN, Angular, ASP.Net, C#, SQL Server, IIS, InfoPath, Access, Excel, PowerShell sowie gängigen Web-Sprachen HTML, CSS, JavaScript (jQuery, AngularJS), AJAX, XML, XSL/XSLT. Mein Ausgleich: Reisen, Natur, fein Kochen und Essen, Fitness, Biken, Skiing.

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden /  Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden /  Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden /  Ändern )

Verbinde mit %s

%d Bloggern gefällt das: