Additional steps are required after you apply the OSLCLinks package to your schema to configure the package to work with a security context system.
See Creating a security model for more information about ClearQuest security.
packageutil setaccess -dbset dbset_name user_name password schema_name -record -modifiablebyothers OSLCLink
For example:
packageutil setaccess –dbset 7.0.0 admin "" ALM -record -modifiablebyothers OSLCLink
The display output might be similar to this:
--- Checked out revision 3 of schema 'ALM'
+++ Set access policy for OSLCLink to -modifiablebyothers
+++ Set access policy for select records, fields, and actions
sub OSLC_GetSecurityFieldName
{
my $security_fieldname = "";
my ($entitydef_name) = @_;
# A hash table to keep security field name of each
# entitydef, using entitydef name as the key and security
# field name as the value.
my %security_fields_hash = (
#add entitydef and security context field pairs here
#For example, "ALMTask" => "SecurityPolicy"
);
if (exists $security_fields_hash{$entitydef_name}) {
my $temp_security_fieldname = $security_fields_hash{$entitydef_name};
if (
$::session->GetEntityDef($entitydef_name)->IsSecurityContextField($temp_security_fieldname)) {
$security_fieldname = $temp_security_fieldname;
}
}
return $security_fieldname;
}
The hook returns the security context field name of a specified record type.
For example, if you applied the OSLCLinks package to the ALMTask and ALMRequest record types (whose security context fields are both named SecurityPolicy) and the REFERENCE field that you added in Step 2 is named oslc_SecurityPolicy, then your %security_fields_hash table might look something like this:
my %security_fields_hash = (
"OSLCLink" => "oslc_SecurityPolicy",
"ALMTask" => "SecurityPolicy",
"ALMRequest" => "SecurityPolicy"
packageutil setaccess -dbset dbset_name user_name password schema_name -record -modifiablebyothers OSLCLink
For example:
packageutil setaccess –dbset 7.0.0 admin "" ALM -record -modifiablebyowner OSLCLink
The display output might be similar to this:
--- Checked out revision 4 of schema 'ALM'
+++ Set access policy for OSLCLink to -modifiablebyowner
+++ Set access policy for select records, fields, and actions