You are not authorized to 'Modify library and manage documents' ('Document'). - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

You are not authorized to 'Modify library and manage documents' ('Document').

  • You are not authorized to 'Modify library and manage documents' ('Document').
  • Hi,

    I know I need to set the Provider for my document library to SuppressSecurityChecks to false.

    I'm not sure how to do that -

    Here is some code that I found in the documentation to upload a document into a library, however when I do so I get a 'Not authorized' error

    How do I access the provider for a document library?

    Thanks!

    Ron



     

     

    public void UploadDocumentFluent(Guid parentID, string documentName, string description, string path)

     

     

     

     

     

    //get a document file from file system

     

    System.IO.

     

    FileInfo docFile = new System.IO.FileInfo(path);

     

     

     

     

    App.WorkWith()

     

     

    .DocumentLibrary(parentID)

     

    .CreateDocument()

     

    .Do(d =>

     

     

    d.Title = documentName;

     

    d.Description = description;

     

    )

     

    .CheckOut()

     

    .UploadContent(docFile.OpenRead(), docFile.Extension)

     

    .CheckInAndPublish()

     

    .SaveChanges();

     

  • I figured it out -

    App

     

     

    .WorkWith().DocumentLibrary(parentID).GetManager().Provider.SuppressSecurityChecks = true;

     


    before trying to upload the doc

    thnx

    Ron

  • Hello Ron,

    Another option is using a user with proper permissions. SuppressSecurityChecks is suggested only for particular cases, since it grants full access over the objects.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>