LogoLogo
LogoLogo
  • Welcome
  • Introduction
  • Beginning
    • Server Configuration
    • Sidebar
    • Binaries
  • Client Executables
    • client.exe
    • chaiCmd.exe
    • rmService.exe
  • Modules
    • Module Configuration
    • Inventory
    • File
    • PST
    • Custom
    • Server
    • Folder Lists
    • Own Blob Storage
  • Groups
    • Groups General Overview
    • Groups Configurations
  • Clients Menu
    • Overview
    • Client Information
    • Module Information
  • Reporting
    • Reporting
    • Customize Reports
  • Recipes
    • Group based actions
    • Time based actions
    • Set bandwidth
    • Dump Config
    • Remove PSTs
    • Server Module Scripting
    • Self Service
  • ChaiScript Reference
    • ChaiScript Overview
    • GK Script Object Reference
      • Module Reference
      • HTTP Reference
      • Web Browser
      • File System
      • Graph Reference
      • MS Graph Authentication
      • Hash Reference
      • Registry Reference
      • COM
      • Self Update Reference
Powered by GitBook
On this page

Was this helpful?

  1. Recipes

Group based actions

It is possible to determine a user´s group membership in mainConfigCheck() or any module config check function. To do so copy the following link:

def mainConfigCheck(globalSettings, config) {
    var group = globalSettings["Group"];
	if (type_name(group)=="Map") {
	    gkScript.logInfo("Group: " + group["DisplayName"] + "(" + group["ObjectID"] + ")");

        if ("Offenbach" == group["DisplayName"]) {
            // user is in group named "Offenbach"
		}
        else if ("b865c07b49ab454bbd1f41c7bb466d27" == group["ObjectID"]) {
            // user is in group with id b865c07b49ab454bbd1f41c7bb466d27
        }
    } else {
        // User is unassigned
    }
}

Last updated 1 year ago

Was this helpful?