Eagle vs Drone
Visitor.
196 views

Error with updating Access Controls using Dataport

Hi All

I'd like to update access controls via dataport using CM9.2.

My txt file has two fields Expanded Number and Access Control

In my test I basically want to change the View Metadata value from People in (Blah Blah Business Unit) to <Unrestricted>

This is the replacement value I've tried

View Document: <Unrestricted> View Metadata: <Unrestricted> Update Document: <Unrestricted> Update Record Metadata: <Unrestricted> Modify Record Access: <Unrestricted> Destroy Record: <Unrestricted> Contribute Contents: <Unrestricted>

Instead I get

Error          Id: 1 Uri: 0 Details: Setting property failed. Item Index: 1, Property Caption: 'Access Control', Value: View Document: <Unrestricted> View Metadata: <Unrestricted> Update Document: <Unrestricted> Update Record Metadata: <Unrestricted> Modify Record Access: <Unrestricted> Destroy Record: <Unrestricted> Contribute Contents: <Unrestricted>    Exception message: ## Access Control List could not be created from import data.    Exception message: ## Value could not be converted to an integer.  Value: View Document: <Unrestricted> View Metadata: <Unrestricted> Update Document: <Unrestricted> Update Record Metadata: <Unrestricted> Modify Record Access: <Unrestricted> Destroy Record: <Unrestricted> Contribute Contents: <Unrestricted> (RecordAccessControl) IT12723SP 10:00:00 12600

Where am I going wrong?

Thanks

0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

Re: Error with updating Access Controls using Dataport

I usually attempt to work this out by doing an export and then reverse engineering what is exported.  I do not have 9.2 but this is what I see in more recent versions:

Unique Identifier	Access Control
9000000000	1;2;4;david;david;;;;;;|2;1|3;2;4;Fancypants, Martin J;Fancypants;;Martin J;;;;|4;0|5;0|6;0|7;0

So each 'Access To' (e.g, View Document, View Metadata etc)  is seperayed by | and within that the data is semi-colon seperated.

 

The 'Access To' values are there int equivelants, e.g. 

Unrestricted = 0

View Document = 1

etc

Next is the setting, e.g.

Container = 1

Private = 2

Custom = 2

 

Next is Location type, e.g. Person = 4

 

After that is a list of Location prooperties (e.g. Sort Name, Full Name etc) for the importer to use to try and find the Location.

 

I have to head off now but I can poke around a bit more next week if you need more help.  The trick is to set up a Record with the ACL you are interested in, export it, then have a look at the export data.


Blog | Samples | HPE CM 9.3 SDK Docs
**Any opinions expressed in this forum are my own personal opinion and should not be interpreted as an official statement on behalf of MicroFocus**
0 Likes
Highlighted
Outstanding Contributor.. Sten28 Outstanding Contributor..
Outstanding Contributor..

Re: Error with updating Access Controls using Dataport

To add to David's comments, below is some notes I've taken over the years regarding Access Control and DataPort. Good luck, you're gonna need it B-)

Access Controls

The Access Controls field has information about multiple access controls separated with a | (pipe) with the sub fields separated using a ; (semicolon)

The format of one Access Control is:

integer(Type of Record Access); integer(Access Control Setting);integer(LocationType);string(LocationSortName);string(LocationSurname);string(LocationSurnamePrefix);string(LocationGivenNames);string(Initials);string(NickName);string(IdNumber);string(DateOfBirth)

The Location information is only required if the Access Control Setting is 2 (Private). Where this is not the case the format of one Access Control is simply:

integer(Access Control Setting);integer(Type of Record Access)

  • Type of Record Access (what functionality the access applies to)
    • Accepted values:
      • 1 = ViewDocument
      • 2 = ViewRecord
      • 3 = UpdateDocument
      • 4 = UpdateMetadata
      • 5 = ModifyAccess
      • 6 = DestroyRecord
      • 7 = AddContents
    • Access Control Settings
      • Accepted values:
        • 0 = Public (everyone)
        • 1 = Inherited (Same as Container)
        • 2 = Private (list of Locations)
      • LocationType
        • Accepted values:
          • 1 = Organization
          • 2 = Group
          • 3 = Position
          • 4 = Person
          • 5 = ProjectTeam
          • 6 = Committee
          • 8 = Workgroup
        • Location (Only used if the Access Control Setting is Private)
          • Format of Location field
      • string(LocationSortName);
      • string(LocationSurname);
      • string(LocationSurnamePrefix);
      • string(LocationGivenNames);
      • string(Initials);
      • string(NickName);
      • string(IdNumber);
      • string(DateOfBirth)

Note: Locations of type 0(Unknown), 7(Venue), and 9(StorageProvider) are not supported location types for access control lists.

Note: Bulk Loading does not support Access Controls so if it has been mapped for importing Bulk Loader mode will be disabled and there will be a note in the log to this effect.

Note: Update on duplicate will replace the record Access Control with the imported value rather than add to it.

Note: When finding a location a search is done using all the Location fields listed (Location type = x AND SortName = x AND Surname = x AND SurnamePrefix = x AND etc.) If there are more than one locations that match the search the first matching location is used. NickName and IdNumber are Unique fields. To be 100% sure you are using the correct location ensure that the Location has a value in one of these fields.

Note: If the Access Control cannot be set for whatever reason, for example a Location referred to on an Access Control cannot be found in the database. No record creation or update will occur and an error will be output to the log.

Example of an Access Control

1;0|2;0|3;2;4;Abbott, Peter (Mr);Abbott;;Peter;P;;;|4;2;4;Abbott, Peter (Mr);Abbott;;Peter;P;;;|5;2;4;Abbott, Peter (Mr);Abbott;;Peter;P;;;|6;2;4;Abbott, Peter (Mr);Abbott;;Peter;P;;;|7;2;4;Abbott, Peter (Mr);Abbott;;Peter;P;;;

Will apply the following Access Controls to a record:

  • View Document: Everyone
  • View Metadata: Everyone
  • Update Document: Peter Abbott
  • Update record Metadata: Peter Abbott
  • Modify record Access: Peter Abbott
  • Destroy record: Peter Abbott
  • Contribute Contents: Peter Abbott
Eagle vs Drone
Visitor.

Re: Error with updating Access Controls using Dataport

This is incredible, thank you

0 Likes
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.