Задайте вопросЗадайте вопрос
 

ОтвеченоSharePoint - Item - Edit Properties - Access Denied Error

  • 10 февраля 2009 г. 20:36jeff1024 Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     
    I have a SharePoint 2007 EE Site  (with patches up to version 12.0.0.6327) running on Windows Server 2008 & SQL Server 2008.
    I ported an existing site from a different domain to this server by backing up/restoring the content database. The site is running fine.

    I added a new sub-site and here is where I have the issue. If I create a document library, add a document, and then use the drop-down on the item to pick "edit properties" I bounce to the SP Error: Access Denied screen. My account is a site admin and has full access to the sub-site.
    I can view the properties fine.

    When I try to upload a document I get the access denied error message if some of the meta data properties are marked "required". The document is still uploaded. I also get the same error when I try to edit an item in a list.

    I can view/edit the properties in Data sheet view fine. The libraries on the existing sites work fine. It only seems to be an issue on new sub-sites.

    It almost seems like a permission problem generating the property edit forms. There is nothing in the SP log files.

Ответы

  • 9 апреля 2009 г. 18:28jeff1024 Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     ОтвеченоС кодом
    I worked through this issue with Micrososoft PSS. The Februray hotfix rollup kb961756 & kb961755 contain a fix to prevent this issue from occuring. This does not fix existing sites though. The support person sent me a small executable that when executed against the SP libraries with the issue fixed the problem. The source code for this app is as follows. Put this in a console app and pass the site URL and list name as parameters.
    using System;
    using System.Collections.Generic;
    using System.Text;
    using Microsoft.SharePoint;
    using System.Xml;
    
    namespace CA_TestingHotfix
    {
        class Program
        {
            static void Main(string[] args)
            {
                FixField(args);
            }
    
            static void FixField(string[] args) 
            { 
                string RenderXMLPattenAttribute = "RenderXMLUsingPattern";
    
                //Console.WriteLine("Please enter the URL of the site: (Press enter after typing):");
                string weburl = args[0];
    
                //Console.WriteLine("Please enter the Document Library Name: (Press enter after typing):");
                string listName = args[1];
                SPSite site = new SPSite(weburl); 
                SPWeb web = site.OpenWeb(); 
                SPList list = web.Lists[listName]; 
                SPField f = list.Fields.GetFieldByInternalName("PermMask"); 
                string s = f.SchemaXml; 
                Console.WriteLine("schemaXml before: " + s); 
                XmlDocument xd = new XmlDocument(); 
                xd.LoadXml(s); 
                XmlElement xe = xd.DocumentElement; 
                if (xe.Attributes[RenderXMLPattenAttribute] == null) 
                { 
                    XmlAttribute attr = xd.CreateAttribute(RenderXMLPattenAttribute);
                    attr.Value = "TRUE"; 
                    xe.Attributes.Append(attr); 
                } 
                string strXml = xe.OuterXml; 
                Console.WriteLine("schemaXml after: " + strXml); 
                f.SchemaXml = strXml; 
            }
    
        }
    }
    
    
    • Предложено в качестве ответаM_MS 22 апреля 2009 г. 8:38
    • Помечено в качестве ответаjeff1024 22 апреля 2009 г. 13:33
    •  
  • 16 февраля 2009 г. 3:05Xue-Mei Chang-MSFTMSFT, МодераторМедали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     Отвечено
    Hi,

    If you export a list template and then use the list template as a custom list template, after this you create a new list item and save, when you edit the list item, you will get an “Access Denied” error. This is by design behavior and is targeted for the next release.

    Let me know if I misunderstand you.


    Xue-Mei Chang

Все ответы