Editable content on masterpage

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
2/28/2011 2:18:57 PM
Gravatar
Total Posts 19

Editable content on masterpage

Hi, there seems to be an issue with this functionality,

As per the notes in the code,  if i log in as an administrator etc, it works fine.

However,  i have set the permissions for an individual, and stepped through though the code (make sure that the module referenced in the masterpage isnt on the current display page)

in htmledit.aspx.cs in the below function

private bool UserCanEdit(int moduleId)
        {
            bool result = UserCanEditModule(moduleId, HtmlContent.FeatureGuid);
            if ((!result) && (pageId == -1) && (module != null))
            {
                // allow it to be edited if user has edit permissions on the module
                // to support re-use with modulewrapper and still allow editing
                result = WebUser.IsInRoles(module.AuthorizedEditRoles);

            }

            return result;
        }

 

result is equal to false, the pageID = -1 (as i'm using the  <portal:ModuleWrapper on the masterpage) and module is returning as null so this fails and doesnt drop into the if statement.

Thanks

 

3/1/2011 9:23:22 AM
Gravatar
Total Posts 18439

Re: Editable content on masterpage

Hi Simon,

You are right there is a bug there, I thought I had fixed it to work but I was wrong. I will add special logic to fix this for the Html feature only. I really hate the modulewrapper because it is such a hack of a solution and it makes it difficult to enforce the security model. I know it comes in handy though so I will fix it for the html feature. Wherever possible though I think people should use the global content feature listed on the bottom of this page instead of modulewrapper.

http://www.mojoportal.com/publishing-the-same-content-on-multiple-pages.aspx

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.