SDK Javascript v5.x

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

profile #

Instantiate a new security Profile object.

profile(id, content) #

Arguments Type Description
id string Unique profile identifier
content JSON Object Profile content

Return Value #

Returns the new security Profile object.

Usage #

Copied to clipboard!
var profileDefinition = {
  policies: [
    {roleId: 'myrole'},
    {roleId: 'default', restrictedTo: [{index: 'index1'}, {index: 'index2', collections: ['foo', 'bar'] } ] }
var profile ='myprofile', profileDefinition);