ACL tabs

Permission: Settings management

ACL tabs setting is used to configure design of tabs in search result on data permissions page.

Configuration

  1. Left menu - settings

  2. In panel "Settings list" use icon "Update" for setting "ACL_TABS".

  3. Enter JSON configuration and confirm by pressing "Save" button.

Default configuration

Default configuration contains several default attributes to see how configuration should looks like. Probably this configuration doesn't match model of your data but can serve as example of short configuration.

  1. Left menu - settings

  2. In panel "Settings list" use icon "Update" for setting "ACL_TABS".

  3. Press button "Default" and store by pressing button "Save".

Automatic configuration

Automatic configuration is used to generate configuration which contains attributes of several random data nodes and several random relationships. Random nodes are selected as first 1000 nodes, random relationships are selected as first 1000 relationships. Generated JSON contains two tabs: one for nodes and all attributes of random nodes and second for relationships and all attributes of random relationships.

This automatically generated configuration can be used as good starting point to create own configuration.

  1. Left menu - settings

  2. In panel "Settings list" use icon "Update" for setting "ACL_TABS".

  3. Press button "Automatic", wait for generator to generate JSON and store by pressing button "Save".

Description of configuration

Configuration is entered as JSON. Example of JSON:

[
{
"label": "Nodes",
"group": "nodes",
"fields": [],
"columns": [
{"dataAttr": "_dbId"},
{"dataAttr": "title"}
]
},
{
"label": "All Person nodes",
"group": "nodes",
"fields": [
{"name": "type", "values": ["person"]}
  ],
"columns": [
{"dataAttr": "_dbId"},
{"dataAttr": "title"}
]
},
{
"label": "Only some Person nodes",
"group": "nodes",
"fields": [
{ "name": "type", "values": ["person"]},
{ "name": "subtype", "values": ["auditor", "manager"]}
],
"columns": [
{"dataAttr": "_dbId"},
{"dataAttr": "title"}
]
},
{
"label": "Companies by label",
"group": "nodes",
"fields": [],
"labels": ["CompanyBig", "CompanySmall"],
"columns": [
{"dataAttr": "_dbId"},
{"dataAttr": "title"}
]
}
]

Explanation of JSON properties:

Property

Values

Default

Description

Usage

label

MANDATORY

String

 

Title of tab with search results used on Search page.

ACL Page

group

MANDATORY

"nodes"

 

Only value "nodes" is supported for this setting.

ACL Page

fields

Array of SFO objects

 

Array of filter criteria. Defined criteria will be used in search and only elemets which match these criteria will be shown in results. If not defined, set to null or set to empty array then no filtering is applied for this tab. Each criteria is defined by SFO (Search Filter Object).

Logical "AND" is between each criteria in fields and logical "OR" is between items in values. Final condition based on fields can be for example: "type"="person" AND ("subtype"="auditor" OR "subtype"="manager").

ACL Page

SFO.name

MANDATORY

String

 

Name of the DB property to filter on. This property has to be indexed, which means it has to be set in properties of Node Index configuration. For more information see Node index.

ACL Page

SFO.values

MANDATORY

Array of strings

 

List of values of the DB property which are matched in search filter. The exact value is matched.

ACL Page

labels

Array of strings

 

Defines search criteria for node DB labels. Logical "OR" is between items.

ACL Page

columns

MANDATORY

Array of CDO objects

 

Array of column definitions used in search results table. Each column is defined by CDO (Column Definition Object) which holds primarily the DB property name. Other metadata is used from Data schema (e.g. label and orderType).

ACL Page

CDO.dataAttr

MANDATORY

String

 

Name of the DB property used in defined column. Values of this DB property will be listed as cell values in table column.

Search Page

CDO.render

EXPERIMENTAL

String

 

String used for creating a JavaScript function passed to DataTables as a column renderer. You can use this to create custom rendering of values in defined column. For example you can used the template labels to visually differentiate truthy and falsy values. The cell value is passed to function as data variable.

Example: "switch(data){case 'truthy_value': return '<span class=\"label label-success\">'+data+'</span>'; break; case 'falsy_value': default: return '<span class=\"label label-danger\">'+data+'</span>';}"

All label classes in template and their colors:

  • label-default : gray

  • label-primary : blue

  • label-success : green

  • label-info : cyan

  • label-warning : yellow

  • label-danger : red

ACL Page