2

I am trying to add Translation Management Rights through code on each publication. My logic is to use Core Services and I made one method which will for existing group add Rights. Method is following:

public static PublicationData SetRightsOnPublication(PublicationData publication, string trusteeId, Rights allowedRights, Rights deniedRights = Rights.None)
        {
            var entries = publication.AccessControlList.AccessControlEntries.ToList();
            // First check if this trustee already has some permissions
            var entry = entries.SingleOrDefault(ace => ace.Trustee.IdRef == trusteeId);
            if (entry != null)
            {
                // Remove this entry
                entries.Remove(entry);
            }
            entries.Add(new AccessControlEntryData
            {
                AllowedRights = allowedRights,
                DeniedRights = deniedRights,
                Trustee = new LinkToTrusteeData { IdRef = trusteeId }
            });
            publication.AccessControlList.AccessControlEntries = entries.ToArray();
            return publication;
        }

I will call it with this:

connector.client.Update(SetRightsOnPublication(pubData, "tcm:0-95-65568", Rights.TemplateBuildingBlockManagement, null);

But through Core Service I can just access to standard Rights inside of Security of publication. There is no 'Translation Configuration' or 'Translation Management' rights. Suppose that I need to use TranslationManager API and some .dll.

But I do not understand how to connect it to Core Service. Do someone have example of some code how to use this and to get Right for Translation Management that I need?

Thanks in advance.

Bojana

3

The current versions do unfortunately not offer an API for setting Translation Management rights. It is being worked on for the next version.

The rights are saved in app data with the application ID tm:Rights. It's not a public format as such, but if you throw the binary data into a memory stream and load an XML document from it, you should get something that makes sense.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.