OSLCLinks パッケージがセキュリティ コンテキスト システムで機能するよう構成するには、パッケージをスキーマに適用した後に追加のステップが必要です。
ClearQuest のセキュリティについて詳しくは、「セキュリティ モデルの作成」を参照してください。
packageutil setaccess -dbset dbset_name user_name password schema_name -record -modifiablebyothers OSLCLink
以下に例を示します。
packageutil setaccess –dbset 7.0.0 admin "" ALM -record -modifiablebyothers OSLCLink
この表示出力は、以下のようになります。
--- 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;
}
指定されたレコード タイプのセキュリティ コンテキスト フィールド名がフックにより戻されます。
例えば、OSLCLinks パッケージをレコード タイプ ALMTask と ALMRequest (セキュリティ コンテキスト フィールド名はいずれも SecurityPolicy) に適用し、ステップ 2 で追加した参照フィールドの名前が oslc_SecurityPolicy である場合、その %security_fields_hash テーブルは次のようになります。
my %security_fields_hash = (
"OSLCLink" => "oslc_SecurityPolicy",
"ALMTask" => "SecurityPolicy",
"ALMRequest" => "SecurityPolicy"
packageutil setaccess -dbset dbset_name user_name password schema_name -record -modifiablebyothers OSLCLink
以下に例を示します。
packageutil setaccess –dbset 7.0.0 admin "" ALM -record -modifiablebyowner OSLCLink
この表示出力は、以下のようになります。
--- Checked out revision 4 of schema 'ALM'
+++ Set access policy for OSLCLink to -modifiablebyowner
+++ Set access policy for select records, fields, and actions