English Deutsch Français Italiano Particle Software Buy Now


Particle Software
 
Group Membership
   ..::   About  •  Purchasing  •  Search  •  Contact  • Home   ::..
 
Screenshots
• Sample
Downloads
Resources
• FAQ
• Macros

 
   With IntraLaunch 4.8 and higher the ability exists to check if the currently logged in user is a member of a given local or domain/global group. Below shows a couple examples of how to use Javascript and IntraLaunch to check if a user is a member of a specific group and if so forward the browser to a different web page/menu.

  The functions CheckLocalGroup(username, groupname) will allow you to check local group membership on the workstation, CheckGlobalGroup(username, groupname, domainname) allows you do check group membership on the domain or globally. Both functions return a boolean True or False.

  Windows 2000/XP or higher required. May work under WindowsNT.

   The variables %username%, %userdomain% and %computername% will work if specified.


GroupCheck.exe is a small program that shows what groups IntraLaunch will see both locally and in a domain. This helps with debugging your problems.


 
 
<HTML>

<SCRIPT LANGUAGE="JavaScript">
  function CheckGroup()
  {
     if (IntraLaunch.CheckLocalGroup("kenw", "Users"))
     {
       alert('kenw is a memeber of group Users');
     }
     else
     {
       alert('kenw is not a memeber of group Users');
     }
  }
</SCRIPT>

<BODY>

<a href="Javascript:CheckGroup();">Check Membership</a>

</BODY>

<OBJECT ID="IntraLaunch" STYLE="display : none" WIDTH=1 HEIGHT=1    CODEBASE="http://intranet.net/menu/IntraLaunch.CAB#version=5,0,0,0"
   CLASSID="CLSID:0AE533FE-B805-4FD6-8AE1-A619FBEE7A23">
   <PARAM NAME="ImageLoc" VALUE="Null">
   <PARAM NAME="ImageSrc" VALUE="Null">
   <PARAM NAME="Run" VALUE="Null">
   <PARAM NAME="RunParms" VALUE="">
</OBJECT>

</HTML>
 
 
       



  The following example will check which domain group the currently logged in user belongs to when the web page loads, and automatically forwards the browser to the correct department's Intranet menu.

 
 
<HTML>

<SCRIPT LANGUAGE="JavaScript">
  function CheckGroups()
  {
    if (IntraLaunch.CheckGlobalGroup("%username%", "Sales", "%userdomain%"))
    {
        location.href = 'http://intranet.company.com/menu/sales.html';
    }
    else if (IntraLaunch.CheckGlobalGroup("%username%", "HR", "%userdomain%"))
    {
        location.href = 'http://intranet.company.com/menu/hr.html';
    }
    else if (IntraLaunch.CheckGlobalGroup("%username%", "Accounting", "%userdomain%"))
    {
        location.href = 'http://intranet.company.com/menu/accounting.html';
    }
    else
    {
        location.href = 'http://intranet.company.com/menu/default.html';
    }
  }
</SCRIPT>

<BODY OnLoad="CheckGroups()">

<center>(Please wait, checking group membership)</center>

</BODY>

<OBJECT ID="IntraLaunch" STYLE="display : none" WIDTH=1 HEIGHT=1    CODEBASE="http://intranet.net/menu/IntraLaunch.CAB#version=5,0,0,0"
   CLASSID="CLSID:0AE533FE-B805-4FD6-8AE1-A619FBEE7A23">
   <PARAM NAME="ImageLoc" VALUE="Null">
   <PARAM NAME="ImageSrc" VALUE="Null">
   <PARAM NAME="Run" VALUE="Null">
   <PARAM NAME="RunParms" VALUE="">
</OBJECT>

</HTML>
 
 



  Another basic example for global/domain groups. The domain name should not have any \\ before it, just the name of your domain is required, such as NTDOMAIN or domain.yourcompany.com. %userdomain% might also work for automatic substitution.

  Below, if the user is a member of the group Backup the backup program is executed. If not an error message is shown.

 
 
<HTML>

<SCRIPT LANGUAGE="JavaScript">
  function CheckGroup()
  {
     if (IntraLaunch.CheckGlobalGroup("%username%", "Backup", "NTDOMAIN"))
     {
       IntraLaunch_Backup.ExecuteIt('Null');
     }
     else
     {
       alert('You are not a memeber of the group Backup in NTDOMAIN');
     }
  }
</SCRIPT>

<BODY>

<a href="Javascript:CheckGroup();">Run Backup</a>

</BODY>

<OBJECT ID="IntraLaunch" STYLE="display : none" WIDTH=1 HEIGHT=1    CODEBASE="http://intranet.net/menu/IntraLaunch.CAB#version=5,0,0,0"
   CLASSID="CLSID:0AE533FE-B805-4FD6-8AE1-A619FBEE7A23">
   <PARAM NAME="ImageLoc" VALUE="Null">
   <PARAM NAME="ImageSrc" VALUE="Null">
   <PARAM NAME="Run" VALUE="Null">
   <PARAM NAME="RunParms" VALUE="">
</OBJECT>

<OBJECT ID="IntraLaunch_Backup" STYLE="display : none" WIDTH=1 HEIGHT=1    CODEBASE="http://intranet.net/menu/IntraLaunch.CAB#version=5,0,0,0"
   CLASSID="CLSID:0AE533FE-B805-4FD6-8AE1-A619FBEE7A23">
   <PARAM NAME="ImageLoc" VALUE="Null">
   <PARAM NAME="ImageSrc" VALUE="Null">
   <PARAM NAME="Run" VALUE="%windir%\msbackup.exe">
   <PARAM NAME="RunParms" VALUE="">
   <PARAM NAME="Display" VALUE="Max">
   <PARAM NAME="ProcessErr" VALUE="OpenPage">
   <PARAM NAME="ErrAction" VALUE="http://company.com/error.html">
   <PARAM NAME="Log" VALUE="="%mydocuments%\IntraLaunch.log">
</OBJECT>

</HTML>
 
 





Copyright © 1997-2008 Particle Software - All Rights Reserved
Web services provided by Extreme Hosting