Absent Member.. Absent Member..
Absent Member..
599 views

Ad hoc Access Controls

Jump to solution

Hi,

 

I've had a browse around but couldn't find a topic that answers my problem:

 

We currently have some code that creates a set of folders and applies Access Control based on a larger folder.  However, recently we've decided to change one of these folders to have separate Access Control settings, to restrict Contribute Contents Access to 2 locations.

My thinking was to add new code to deal with the specific folder.  However, I'm having some difficulty setting the Access Control to more than one location.

I've tried the following (oLoc and oSalLoc are locations):

 

.SetAccessControlDetailsEx dxAddContents, asPrivate, oLoc
.SetAccessControlDetails dxAddContents, asPrivate, oSalLoc

 

My thinking was that the first line would clear any existing Contribute Contents access and set it to oLoc, and the second line would then add oSalLoc to the list, so I would end up with both.

I'm not sure if the asPrivate restricts it to a single value (oLoc or oSalLoc), but I couldn't figure out how to use the Ad Hoc value (asAdHoc doesn't seem to be recognised).

 

I'd prefer not to have to set up a Group containing these two locations, so any help would be appreciated.

 

Cheers

Michael

0 Likes
1 Solution

Accepted Solutions
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Re: Ad hoc Access Controls

Jump to solution

SetAccessControlDetail(ex) functions overwrite all existing access control for the specific access setting.

Try to use an array of locations to set the access to multiple locations at once:

 

Location[] oLocations;
oLocations.Add(oLoc);
oLocations.Add(oSalLoc);
.SetAccessControlDetailsEx(dxAddContents, asPrivate, oLocations)

 


(Any opinions expressed in this forum are my own personal opinion and should not be construed as an official statement by DXC Technology.)

Analytics & Data Management
Application & Business Services
DXC Technology

View solution in original post

3 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Ad hoc Access Controls

Jump to solution
Did you try flipping the calls around? Call the ex one second maybe?
---------
Erik
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Ad hoc Access Controls

Jump to solution

I did, and the result is Contribute Contents set to oLoc.

0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Re: Ad hoc Access Controls

Jump to solution

SetAccessControlDetail(ex) functions overwrite all existing access control for the specific access setting.

Try to use an array of locations to set the access to multiple locations at once:

 

Location[] oLocations;
oLocations.Add(oLoc);
oLocations.Add(oSalLoc);
.SetAccessControlDetailsEx(dxAddContents, asPrivate, oLocations)

 


(Any opinions expressed in this forum are my own personal opinion and should not be construed as an official statement by DXC Technology.)

Analytics & Data Management
Application & Business Services
DXC Technology

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.