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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesIsEditable always false in custom moduleIsEditable always false in custom module
Previous
 
Next
New Post
3/3/2011 6:36 PM
 
J, I think we're talking about two different things.

I'm talking about the MODES in the control panel, top left of most DNN pages (VIEW/EDIT/LAYOUT).

Even if you have Edit permissions, if you are in VIEW mode, iseditable will always be false.

Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
3/3/2011 6:50 PM
 
Hi,
Ok. Now we are talking about the same. So I am looking at the wrong property. What do I need to do to check the correct permissions for editing?
J.
 
New Post
3/3/2011 11:32 PM
 
You are looking at the right property. If the user has EDIT permissions based on the ROLES, AND they are in EDIT mode in the control panel, IsEditable will be true.

Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
3/3/2011 11:41 PM
 
In the latest versions of dnn permission checking is best done thru either the
TabPermissionController or ModulePermissionController

via calls to the appropriate methods:
TabPermissionController.CanAdminPage()

or for more module specific testing:

ModulePermissionController.CanAdminModule()
ModulePermissionController.CanEditModuleContent()

These calls tend to give you greater granularity than IsEditable - and ultimately isEditable is calling back to these routines now as well.

Westa
 
New Post
3/5/2011 7:23 AM
 
Hi,
I guess I need both approaches. However, the ModuleConfiguration is null although CategoryMenu inherits from CategoryBase which inherits from PortalModuleBase or UserModuleBase. what implementation am I missing to get the ModuleConfiguration in the control bbayt:CategoryMenu? The ShopMenu is in the Module Controls with view permissions if I replace it with CategoryMenu directly it is working. However, I would like to have a ShopMenu which can be build of various controls. I do however not know how to get the ModuleConfiguration not being null.

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ShopMenu.ascx.cs" Inherits="bBayt.DNN.Modules.ShoppingEngine.Controls.UI.ShopMenu" %>
<%@ Register assembly="System.Web.Extensions" namespace="System.Web.UI" tagprefix="asp" %>   
<%@ Register TagPrefix="bBayt" TagName="CategoryMenu" Src="~/DesktopModules/bBaytShoppingEngine/Controls/UI/CategoryMenu.ascx" %>
<bBayt:CategoryMenu id="categoryMenu" runat="server"/>

Second, is the BreadCrumb which also using this rendering. It is a skinobject which cannot inherit from my CategoryBase either. So I also use same approach there:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BreadCrumbSkinObject.ascx.cs"
Inherits="bBayt.DNN.Modules.SkinObject.Controls.UI.BreadCrumbSkinObject" %>
<%@ Register Src="~/Desktopmodules/bBaytShoppingEngine/Controls/UI/BreadCrumb.ascx"
TagName="BreadCrumb" TagPrefix="bBayt" %>
<bBayt:BreadCrumb ID="BreadCrumb" runat="server" />

Same problem with ModuleConfigation being Null, but a skinobject has no moduleid (e.a. permissions). So that scenario does not work and the breadcrumb cannot render similar items as the categorymenu. Right?

J.
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesIsEditable always false in custom moduleIsEditable always false in custom module


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