3 Replies Latest reply: Jul 26, 2012 12:20 PM by Brent Nichol RSS

    QMS API: How do I add "<All Authenticated>" authorization to a document?

      Hi All,

       

      I'm writing the following code, trying to add "<All Authenticated>" authorization to a codument. But I can't get it done.

       

       

      var backendClient = new QMSBackendClient();

      ServiceKeyClientMessageInspector.ServiceKey = backendClient.GetTimeLimitedServiceKey();

      ...

      var metaData = backendClient.GetDocumentMetaData(docNode, DocumentMetaDataScope.Authorization);

      DocumentAccessEntry user = new DocumentAccessEntry {

           UserName = "", // doesn't work

           // UserName = "<All Authenticated>", // also doesn't work

           // UserName = "aRealUserName", // this works and can authorize a user for this document

          AccessMode = DocumentAccessEntryMode.Always,

          DayOfWeekConstraints = new List<DayOfWeek>()

      };

      metaData.Authorization.Access.Add(user);

      backendClient.SaveDocumentMetaData(metaData);

       

       

      Any one knows how to get this done?
      Thanks.