public static PortalSettings GetPortalSetting(this XElement element, string id)
 {
     var portalItem = new PortalSettings();
     portalItem.AlwaysShowEditButton = Convert.ToBoolean(element.Attribute("AlwaysShowEditButton").Value);
     portalItem.PortalName = element.Attribute("PortalName").Value;
     portalItem.PortalId = id;
     return portalItem;
 }
        /// <summary>
        /// enables developers to easily check 
        /// whether the current browser client has access to edit the settings
        /// of a specified portal module
        /// </summary>
        public bool HasEditPermissions(PortalSettings module)
        {
            /*
            // Obtain SiteSettings from Current Context
            var siteSettings = (SiteConfiguration)HttpContext.Current.Items["SiteSettings"];

            // Find the appropriate Module in the Module table
            SiteConfiguration.ModuleRow moduleRow = siteSettings.Module.FindByModuleId(moduleId);

            string editRoles = moduleRow.EditRoles;
            string accessRoles = moduleRow.TabRow.AccessRoles;

            if (IsInRoles(accessRoles) == false || IsInRoles(editRoles) == false)
            {
                return false;
            }
             */
            return true;
        }