Skip to main content

NetIQ IDM - How to close a workflow request based on a group membership (NetIQ Userapp workflow forms)


Solution:

Suppose you want to close a request form by cancelling it upon a certain condition, such as if the caller is requires to be member of a specific eDirectory group.

1. On the request form,  add a field called "recipient". i.e the caller of the form
2. Workflow->Start->Data-Item-Mapping, Add  "recipient" as the source expression
3. On the request form field "recipient", Properties add event "onload"
4  Paste the following script:


function CheckGroupAccess(userDN)
 {

 var isMember;

 var grp = IDVault.get(null,userDN,'user','group');

 var access_grp = "ACCESS_GROUP_DN";

access_grp = access_grp.toLowerCase();

var lvEnt = Array();

lvEnt = grp;

var EntSize = lvEnt.length-1;

  for (var i = 0; i <= EntSize; i++)
     {
        currentEnt=lvEnt[i].toString().toLowerCase();

if (currentEnt.match(access_grp))
{isMember="x";
  break ;}
  else
  continue;
  };

 return isMember;

 }


5. Add the following script on the same page below or above the previous one

try{



if (CheckGroupAccess(field.getValue()) != "x"){

  alert("You are not authorized for this form, closing request form");
       form.submit("CancelAction");
}
     // DEPENDS ON YOUR CHOICE
    //form.showMsg("Authorized ok, please proceed");

}catch(e){
 alert(e);
}

Comments

Maqsood Bhatti said…
I just added this code since the workflow default Trustee rights functionality never worked for me in any version. they should remove it or should call it something else like "Authenticated Users"

Popular posts from this blog

My own developed - Active Directory Cache Inspector for AD Driver Novell Identity manager

Sometimes there is a need for us (Consultants) to see a snapshot of all the changes that happened on the Active directory side while the Novell AD IDM driver was stopped or was not running, before we decide to start the AD driver. Since Novell Identity Manager currently allows us to see all the events which happened in the Identity vault only, but not on the AD side, I decided to write such a tool myself, and of course wanted to share this tool with the consultants/community out there. It's a .NET 2.0 WinForm application, written in C# programming language. To run this tool you should have at minimum: .NET 2.0 framework installed, ( Not supported on the Linux platforms yet) This application must be run under the same user which is configured on the AD driver. Short Tutorial (How To): When you run the application (ADCView.exe), the application automatically discovers the current domain, a domain controller, and default domain naming context in the user logged in domain automatically

NetIQ IDM - How to read Component type data from Query nodeset done from command transformation

Suppose query: <do-set-local-variable name="local.sub.ctp.QueryContacts" scope="policy"> <arg-node-set> <token-query class-name="User" scope="entry"> <arg-match-attr name="UPN"> <arg-value type="string"> <token-src-attr class-name="User" name="UPN"/> </arg-value> </arg-match-attr> <arg-match-attr name="contacts"> <arg-value type="string"> <token-text xml:space="preserve">get-contacts</token-text> </arg-value> </arg-match-attr> <arg-match-attr name="userid"> <arg-value type="string"> <token-association/> </arg-value> </arg-match-attr> </token-query> </arg-node-set> </do-set-local-variable> Outpu