RemoveACTFromObj

Short Description

Removes the authorizations defined by an ACT from the specified resource.

Category

General authorization administration methods

Syntax

RemoveACTFromObj(tCtxt,resource,flags,ACTresource);

Parameters

Method Parameters
Parameter
Type
Direction
Description
tCtxt
string
in
Optional handle representing a server-side transaction context.
resource
string
in
Passed resource identifier for the object from which the ACT should be removed. If TCTXT is used, do not specify a value in RESOURCE.
flags
int
in
Currently unused. Callers should set this parameter to 0.
ACTresource
string
in
Resource identifier of an ACT object.

Details

The RemoveACTFromObj method disassociates an ACT from a resource, while leaving the ACT intact. Use the DestroyAccessControlTemplate method to destroy the ACT.

Exceptions Thrown

The SAS Open Metadata Interface explicitly returns the following exceptions for the RemoveACTFromObj method:
  • SECAD_INVALID_TC_HANDLE
  • SECAD_INVALID_RESOURCE_SPEC
  • SECAD_INVALID_ACTION
  • SECAD_OBJECT_NOT_ACT
  • SECAD_ACT_DOES_NOT_EXIST
  • SECAD_ACT_NOT_REMOVED
  • SECAD_NOT_AUTHORIZED

Examples

The following code fragment shows how the RemoveACTFromObj method is issued from a Java environment:
public void removeAccessControlTemplateFromObj(String transCtxt, String resource,
 int options, String ACTspec ) throws Exception {
		
	try
	{
		iSecurityAdmin.RemoveACTFromObj(transCtxt, resource, options, ACTspec);
	}
	catch (Exception e) {
		System.out.println("RemoveACTFromObj: Exceptions");
		e.printStackTrace();
		throw e;
	}
}
The following example removes the ACT identified by ACTspec from a Tree object identified by Tree_URN:
public void RemoveAccessControlTemplateFromObj() throws Exception {  
   try
   {
     // Remove the ACT from the Tree to see the impact on authorizations
    iSecurityAdmin.RemoveAccessControlTemplateFromObj "",Tree_URN, 0, ACTspec);	
   }
  catch(Exception e) 
     {
	e.printStackTrace();
	throw e;
   }
}