제공된 레코드(Entity 오브젝트)에 대해 액세스 가능한 조치 목록을 리턴합니다.
이 메소드는 EntityDef의 GetActionDefNames 메소드와 유사합니다. 그러나 이 메소드에서 리턴된 목록에는 현재 상태에서 Entity 오브젝트에 대해 수행할 수 있는 조치만이 리턴됩니다. Session 오브젝트의 EditEntity 메소드를 호출하기 전에 이 메소드를 사용하여 사용자가 레코드에 대해 적절하게 수행할 수 있는 조치를 판별할 수 있습니다.
리턴된 목록은 상태를 기본으로 허용되는 조치만 나열하며 사용자가 수행할 권한을 갖고 있는 조치로 제한됩니다. 그러나 권한 확인은 그룹 액세스 권한만을 기본으로 합니다. 대신, 조치 또는 임의의 기본 조치가 access_control 후크를 갖고 있으면 해당 후크를 사용하여 사용자가 조치를 수행할 권한을 갖고 있는지 여부를 판별하지 않습니다. 따라서, 사용자가 해당 조치 중 하나를 실행할 경우 "권한 거부" 오류 메시지가 발생할 수 있습니다.
후크 내에서 이 메소드를 호출할 경우, 사용자는 항상 현재 레코드 상태에 적절한 조치를 실행할 권한을 갖습니다.
VBScript
entity.GetLegalActionDefNames
Perl
$entity->GetLegalActionDefNames();
Perl의 경우 문자열 배열에 대한 참조가 리턴됩니다.
VBScript
set sessionObj = GetSession
entityDefName = GetEntityDefName
set entityDefObj = sessionObj.GetEntityDef(entityDefName)
' Search for a legal action with which to modify the record
actionDefList = GetLegalActionDefNames
For Each actionDef in actionDefList
actionDefType = entityDefObj.GetActionDefType(actionDef)
if actionDefType = AD_MODIFY Then
sessionObj.EditEntity entity, actionDef
Exit For
End If
Next
Perl
$sessionobj = $entity->GetSession();
$entitydefname = $entity->GetEntityDefName();
$entitydefobj = $sessionobj->GetEntityDef($entitydefname);
# Search for a legal action with which to modify the record
$actiondeflist = $entity->GetLegalActionDefNames();
foreach $actionname(@$actiondeflist)
{
$actiondeftype = $entitydefobj->GetActionDefType($actionname);
if ($actiondeftype eq $CQPerlExt::CQ_MODIFY)
{
$sessionobj->EditEntity($entity,$actionname);
}
}