How do custom clearances work in the MyGeotab SDK?

Applies To

  • MyGeotab SDK
  • Clearances

Answer

The call Get<Group> with a GroupSearch for 'GroupSecurityId' returns the list of all the clearances in the database:

api.call("Get", {
    "typeName": "Group",
    "search": {
        "id":"GroupSecurityId"
    }
});

Seven of them will be the default clearances created by MyGeotab; these will be the same in every database. You can identify them by their ids:

  • GroupSecurityId
  • GroupEverythingSecurityId
  • GroupSupervisorSecurityId
  • GroupUserSecurityId
  • GroupViewOnlySecurityId
  • GroupNothingSecurityId
  • GroupDriveUserSecurityId

Each default clearance lists the corresponding enabled features within the securityFilters array. The exception to this is GroupEverythingSecurityId which is Administrator (noted by the string "Everything"). These will be the same in every database and cannot be changed by the users. 

The result of the API call will also include all the custom clearances created by the database's users. Each custom clearance is made as a child of one of the default clearances above, or a child of another existing custom clearance, respectively. The securityFilters array displays all the changes in this new clearance compared to its direct parent.

For example in the screenshot below, the clearance named 'test' is a child of the default Administrator clearance.

The only change is that the 'View Device Reports' feature is disabled. Thus the securityFilters object shows that feature (which it refers to as 'DeviceList') as disabled. Note that it does not specify anything about the other features, which are enabled by default in both the Administrator clearance and the custom 'test' clearance. Only features of the clearance that have been changed compared to the parent clearance will be shown in the securityFilters array of the custom clearance.