Unable to Modify or Add Group ACL to document
As part of a 'publishing' function, a group needs to be added or updated to the document security with read only scope. Here is a simplified code snippet (please excuse any errors in the snippet, the full code compiles under Delphi XE2 without errors):
I've tested the case where the 'TESTGROUP' has been assigned to the document with a different security level and code is not able to change it to read only. In the case where the group does not exist for the document, the Add method does not add the group/. In either case no errors are reported. Ideas?
procedure TForm1.publishContent(mDoc: IManDocument; toFolder: IManFolder);
var
dSec: IManSecurity;
oNam: Widestring;
oGrpACLs, dGrpACLs: IManGroupACLs;
oGrpACL, dGrpACL: IManGroupACL;
begin
oNam := 'TESTGROUP';
mDoc.Get_Security(dSec);
if (dSec <> nil) then
begin
dSec.Get_GroupACLs(dGrpACLs);
if (dGrpACLs <> nil) then
begin
dGrpACLs.ItemByName(oNam,dGrpACL);
if (dGrpACL <> nil) then
begin
// update groupACL, it exists so make sure READ only
dGrpACL.Set_Right(imRightRead);
end
else
begin
// not part of document, add groupACL to document
dGrpACLs.Add(oNam,imRightRead,dGrpACL);
end;
dGrpACLs.Refresh;
end;
end;
iResult := mDoc.UpdateWithResults(mResult);
end;
0
Categories
- All Categories
- 107 Developer Announcements
- 53 Articles
- 104 General Questions
- 141 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 76 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 118 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
TeamSite Developer Resources
If you are interested in gaining full access to the content, you can register for a My Support account here.
- Docker Automation
- LiveSite Content Services (LSCS) REST API
- Single Page Application (SPA) Modules
- TeamSite Add-ons
If you are interested in gaining full access to the content, you can register for a My Support account here.