Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Page Editor RolePage Editor Role
Previous
 
Next
New Post
6/23/2006 12:04 PM
 

Is there such a concept as the page editor role?  I'd like to allow a group of users to edit pages, but not have the ability to add pages--  Basically not see the top control panel.

Can this be done?  If so, how?

 
New Post
6/23/2006 12:08 PM
 

page editors are users, that can add modules to a page and need access to the control panel. They can create sub pages of the page they have edit permission as well.

To get a role page editors go to security roles in admin menu, create the role and assign the desired users. goto page settings and grant edit permission, if they are allowed to add and delete modules, grant module permissions, if they only shall be able to edit content.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
6/30/2006 3:53 PM
 

I have this same need. Actually it seems like it should be a very common need. If you get a solution please let me know.

mailto:jfeyes@griffinautomation.com

 
New Post
7/10/2006 3:49 PM
 

Here is the best I could come up with so far

In IconBar.ascx.vb file make the following changes (see underlined text):

Private Sub BindData()

Select Case optModuleType.SelectedItem.Value

Case "0" ' new module

cboTabs.Visible = False

cboModules.Visible = False

cboDesktopModules.Visible = True

txtTitle.Visible = True

lblModule.Text = Services.Localization.Localization.GetString("Module", Me.LocalResourceFile)

lblTitle.Text = Services.Localization.Localization.GetString("Title", Me.LocalResourceFile)

cboPermission.Enabled = True

'added

If PortalSecurity.IsInRole(PortalSettings.AdministratorRoleName) = False Then

cboTabs.Enabled = False

cboModules.Enabled = False

cboPanes.Enabled = False

cboPermission.Enabled = False

cboAlign.Enabled = False

cboPosition.Enabled = False

optModuleType.Enabled = False

cboDesktopModules.Enabled = False

Else

cboPermission.Enabled = True

cboDesktopModules.Enabled = True

End If

Dim objDesktopModules As New DesktopModuleController

cboDesktopModules.DataSource = objDesktopModules.GetDesktopModulesByPortal(PortalSettings.PortalId)

cboDesktopModules.DataBind()

cboDesktopModules.Items.Insert(0, New ListItem("<" + Services.Localization.Localization.GetString("SelectModule", Me.LocalResourceFile) + ">", "-1"))

Case "1" ' existing module

cboTabs.Visible = True

cboModules.Visible = True

cboDesktopModules.Visible = False

txtTitle.Visible = False

lblModule.Text = Services.Localization.Localization.GetString("Tab", Me.LocalResourceFile)

lblTitle.Text = Services.Localization.Localization.GetString("Module", Me.LocalResourceFile)

cboPermission.Enabled = False

'added

If PortalSecurity.IsInRole(PortalSettings.AdministratorRoleName) = False Then

cboTabs.Enabled = False

cboModules.Enabled = False

cboPanes.Enabled = False

cboAlign.Enabled = False

cboPosition.Enabled = False

optModuleType.Enabled = False

cboDesktopModules.Enabled = False

End If

Dim arrTabs As New ArrayList

Dim objTab As TabInfo

Dim arrPortalTabs As ArrayList = GetPortalTabs(PortalSettings.DesktopTabs, True, True)

For Each objTab In arrPortalTabs

If objTab.TabID = -1 Then

' <none specified>

objTab.TabName = "<" & Services.Localization.Localization.GetString("SelectPage", Me.LocalResourceFile) & ">"

arrTabs.Add(objTab)

Else

If objTab.TabID <> PortalSettings.ActiveTab.TabID Then

If PortalSecurity.IsInRoles(objTab.AuthorizedRoles) Then

arrTabs.Add(objTab)

End If

End If

End If

Next

cboTabs.DataSource = arrTabs

cboTabs.DataBind()

End Select

End Sub

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Try

If Not Page.IsPostBack Then

' localization

lblPageFunctions.Text = Services.Localization.Localization.GetString("PageFunctions", Me.LocalResourceFile)

optModuleType.Items.FindByValue("0").Selected = True

lblCommonTasks.Text = Services.Localization.Localization.GetString("CommonTasks", Me.LocalResourceFile)

imgAddTabIcon.AlternateText = Services.Localization.Localization.GetString("AddTab.AlternateText", Me.LocalResourceFile)

cmdAddTab.Text = Services.Localization.Localization.GetString("AddTab", Me.LocalResourceFile)

imgEditTabIcon.AlternateText = Services.Localization.Localization.GetString("EditTab.AlternateText", Me.LocalResourceFile)

cmdEditTab.Text = Services.Localization.Localization.GetString("EditTab", Me.LocalResourceFile)

imgDeleteTabIcon.AlternateText = Services.Localization.Localization.GetString("DeleteTab.AlternateText", Me.LocalResourceFile)

cmdDeleteTab.Text = Services.Localization.Localization.GetString("DeleteTab", Me.LocalResourceFile)

imgCopyTabIcon.AlternateText = Services.Localization.Localization.GetString("CopyTab.AlternateText", Me.LocalResourceFile)

cmdCopyTab.Text = Services.Localization.Localization.GetString("CopyTab", Me.LocalResourceFile)

imgPreviewTabIcon.AlternateText = Services.Localization.Localization.GetString("PreviewTab.AlternateText", Me.LocalResourceFile)

cmdPreviewTab.Text = Services.Localization.Localization.GetString("PreviewTab", Me.LocalResourceFile)

If Not Request.Cookies("_Tab_Admin_Preview" & PortalSettings.PortalId.ToString) Is Nothing Then

Dim objPreview As HttpCookie

objPreview = Request.Cookies("_Tab_Admin_Preview" & PortalSettings.PortalId.ToString)

If objPreview.Value = "True" Then

imgPreviewTabIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_previewtab_on.gif"

End If

End If

lblModule.Text = Services.Localization.Localization.GetString("Module", Me.LocalResourceFile)

lblPane.Text = Services.Localization.Localization.GetString("Pane", Me.LocalResourceFile)

lblTitle.Text = Services.Localization.Localization.GetString("Title", Me.LocalResourceFile)

lblAlign.Text = Services.Localization.Localization.GetString("Align", Me.LocalResourceFile)

imgAddModuleIcon.AlternateText = Services.Localization.Localization.GetString("AddModule.AlternateText", Me.LocalResourceFile)

cmdAddModule.Text = Services.Localization.Localization.GetString("AddModule", Me.LocalResourceFile)

imgWizardIcon.AlternateText = Services.Localization.Localization.GetString("Wizard.AlternateText", Me.LocalResourceFile)

cmdWizard.Text = Services.Localization.Localization.GetString("Wizard", Me.LocalResourceFile)

imgSiteIcon.AlternateText = Services.Localization.Localization.GetString("Site.AlternateText", Me.LocalResourceFile)

cmdSite.Text = Services.Localization.Localization.GetString("Site", Me.LocalResourceFile)

imgUsersIcon.AlternateText = Services.Localization.Localization.GetString("Users.AlternateText", Me.LocalResourceFile)

cmdUsers.Text = Services.Localization.Localization.GetString("Users", Me.LocalResourceFile)

imgFilesIcon.AlternateText = Services.Localization.Localization.GetString("Files.AlternateText", Me.LocalResourceFile)

cmdFiles.Text = Services.Localization.Localization.GetString("Files", Me.LocalResourceFile)

imgHelpIcon.AlternateText = Services.Localization.Localization.GetString("Help.AlternateText", Me.LocalResourceFile)

cmdHelp.Text = Services.Localization.Localization.GetString("Help", Me.LocalResourceFile)

If PortalSettings.ActiveTab.IsAdminTab Then

imgEditTabIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_edittab_bw.gif"

cmdEditTab.Enabled = False

cmdEditTabIcon.Enabled = False

imgDeleteTabIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_deletetab_bw.gif"

cmdDeleteTab.Enabled = False

cmdDeleteTabIcon.Enabled = False

imgCopyTabIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_copytab_bw.gif"

cmdCopyTab.Enabled = False

cmdCopyTabIcon.Enabled = False

Else

ClientAPI.AddButtonConfirm(cmdDeleteTab, Services.Localization.Localization.GetString("DeleteTabConfirm", Me.LocalResourceFile))

ClientAPI.AddButtonConfirm(cmdDeleteTabIcon, Services.Localization.Localization.GetString("DeleteTabConfirm", Me.LocalResourceFile))

End If

If IsAdminControl() Then

cmdAddModule.Enabled = False

imgAddModuleIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_addmodule_bw.gif"

cmdAddModuleIcon.Enabled = False

End If

If PortalSecurity.IsInRole(PortalSettings.AdministratorRoleName) = False Then

imgWizardIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_wizard_bw.gif"

cmdWizard.Enabled = False

cmdWizardIcon.Enabled = False

imgSiteIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_site_bw.gif"

cmdSite.Enabled = False

cmdSiteIcon.Enabled = False

imgUsersIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_users_bw.gif"

cmdUsers.Enabled = False

cmdUsersIcon.Enabled = False

imgFilesIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_files_bw.gif"

cmdFiles.Enabled = False

cmdFilesIcon.Enabled = False

'added

imgAddTabIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_addtab_bw.gif"

cmdAddTab.Enabled = False

cmdAddTabIcon.Enabled = False

imgEditTabIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_edittab_bw.gif"

cmdEditTab.Enabled = False

cmdEditTabIcon.Enabled = False

imgDeleteTabIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_deletetab_bw.gif"

cmdDeleteTab.Enabled = False

cmdDeleteTabIcon.Enabled = False

imgCopyTabIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_copytab_bw.gif"

cmdCopyTab.Enabled = False

cmdCopyTabIcon.Enabled = False

cmdAddModule.Enabled = False

imgAddModuleIcon.ImageUrl = "~/Admin/ControlPanel/images/iconbar_addmodule_bw.gif"

cmdAddModuleIcon.Enabled = False

optModuleType.Enabled = False

End If

BindData()

If PortalSettings.ActiveTab.IsAdminTab = False And IsAdminControl() = False Then

Dim intItem As Integer

For intItem = 0 To PortalSettings.ActiveTab.Panes.Count - 1

cboPanes.Items.Add(Convert.ToString(PortalSettings.ActiveTab.Panes(intItem)))

Next intItem

Else

cboPanes.Items.Add(glbDefaultPane)

End If

If Not cboPanes.Items.FindByValue(glbDefaultPane) Is Nothing Then

cboPanes.Items.FindByValue(glbDefaultPane).Selected = True

End If

If cboPermission.Items.Count > 0 Then

cboPermission.SelectedIndex = 0 ' view

End If

If cboAlign.Items.Count > 0 Then

cboAlign.SelectedIndex = 0 ' left

End If

If cboPosition.Items.Count > 0 Then

cboPosition.SelectedIndex = 1 ' bottom

End If

If Convert.ToString(PortalSettings.HostSettings("HelpURL")) <> "" Then

cmdHelp.NavigateUrl = FormatHelpUrl(Convert.ToString(PortalSettings.HostSettings("HelpURL")), PortalSettings, "")

cmdHelpIcon.NavigateUrl = cmdHelp.NavigateUrl

cmdHelp.Enabled = True

cmdHelpIcon.Enabled = True

Else

cmdHelp.Enabled = False

cmdHelpIcon.Enabled = False

End If

End If

Catch exc As Exception 'Module failed to load

ProcessModuleLoadException(Me, exc)

End Try

End Sub

Then in the ModularSettings.ascx.vb file make the following changes (see underlined text):

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Try

Dim objModules As New ModuleController

' Verify that the current user has access to edit this module

'commented out

'If PortalSecurity.IsInRoles(PortalSettings.AdministratorRoleName) = False And PortalSecurity.IsInRoles(PortalSettings.ActiveTab.AdministratorRoles.ToString) = False Then

'Response.Redirect(NavigateURL("Access Denied"), True)

'End If

'this needs to execute always to the client script code is registred in InvokePopupCal

cmdStartCalendar.NavigateUrl = Common.Utilities.Calendar.InvokePopupCal(txtStartDate)

cmdEndCalendar.NavigateUrl = Common.Utilities.Calendar.InvokePopupCal(txtEndDate)

If Page.IsPostBack = False Then

ctlIcon.FileFilter = glbImageFileTypes

dgPermissions.ModuleID = ModuleId

DotNetNuke.UI.Utilities.ClientAPI.AddButtonConfirm(cmdDelete, Services.Localization.Localization.GetString("DeleteItem"))

cboTab.DataSource = GetPortalTabs(PortalSettings.DesktopTabs, -1, False, True, False, False, True)

cboTab.DataBind()

'if is and admin or host tab, then add current tab

If PortalSettings.ActiveTab.ParentId = PortalSettings.AdminTabId Or PortalSettings.ActiveTab.ParentId = PortalSettings.SuperTabId Then

cboTab.Items.Insert(0, New ListItem(PortalSettings.ActiveTab.TabName, PortalSettings.ActiveTab.TabID.ToString))

End If

' tab administrators can only manage their own tab

If PortalSecurity.IsInRoles(PortalSettings.AdministratorRoleName) = False Then

chkAllTabs.Enabled = False

chkDefault.Enabled = False

chkAllModules.Enabled = False

cboTab.Enabled = False

End If

If ModuleId <> -1 Then

BindData()

Else

cboVisibility.SelectedIndex = 0 ' maximized

chkAllTabs.Checked = False

cmdDelete.Visible = False

End If

'Set visibility of Specific Settings

If ctlSpecific Is Nothing = False Then

'Get the module settings from the PortalSettings and pass the

'two settings hashtables to the sub control to process

ctlSpecific.LoadSettings()

dshSpecific.Visible = True

tblSpecific.Visible = True

Else

dshSpecific.Visible = False

tblSpecific.Visible = False

End If

End If

Catch exc As Exception 'Module failed to load

ProcessModuleLoadException(Me, exc)

End Try

If PortalSecurity.IsInRoles(PortalSettings.AdministratorRoleName) = False Then

Dim AD_URL As String

AD_URL = NavigateURL("Access Denied")

Response.Redirect(AD_URL, True)

End If

End Sub

 

 

 
New Post
3/29/2007 10:49 AM
 

I just put that code in and it works great jfeyes!  I've been trying to figure out how to do that, and I think it is weird that Nuke isn't set up in a way that we would have that option  Anyway, thanks for helping all of us out!

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Page Editor RolePage Editor Role


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out