Start page / Enhanced JSON support / JSON output of user permissions

JSON output of user permissions

It is also possible to pass user permissions to the JSON function which were defined using the CMS_INPUT_PERMISSION input component.
In doing this, the JSON output format takes into account the metadata made persistent on the relevant FirstSpirit object (pages, page references, media) at the time of generation (activity, groups, permissions).

The JSON output of a page or a page reference includes the metadata of the corresponding object. The output will then contain:

  • the activities of the CMS_INPUT_PERMISSION input component
    • If activities have been defined, the metadata is output separately for each individual activity
    • If no activities have been defined, the metadata is output just once ("activity":null)
  • the groups authorized within the input component CMS_INPUT_PERMISSION
  • the “allowed” and “forbidden” permissions, which have been defined for the relevant groups on the object

Important If no permissions have been defined within the input component ("Define permissions" option is deactivated for the input component), the visible, inherited permissions are only output if metadata inheritance has been activated

Example of user permissions with activities

Here is an example for output of user permissions if activities have been defined for the CMS_INPUT_PERMISSION input component (in this case: "allow" and "deny"):

         "permission_with_act": {
"fsType": "CMS_INPUT_PERMISSION",
"name": "permission_with_act",
"valueIsInherited": false,
"value": [
{
"activity": "allow",
"allowed": [
{
"groupName": "Anonyme Besucher",
"groupPath": "/GroupsFile/2"
},
{
"groupName": "Registrierte Mitglieder",
"groupPath": "/GroupsFile/3"
}
],
"forbidden": [
{
"groupName": "Kunden",
"groupPath": "/GroupsFile/4"
}
]
},
{
"activity": "deny",
"allowed": [
{
"groupName": "Kunden",
"groupPath": "/GroupsFile/4"
}
],
"forbidden": [
{
"groupName": "Registrierte Mitglieder",
"groupPath": "/GroupsFile/3"
}
]
}
]
}

Example for user permissions without activities

Here is an example for output of user permissions if no activities have been defined for the CMS_INPUT_PERMISSION input component:

         "permission_without_act": {
"fsType": "CMS_INPUT_PERMISSION",
"name": "permission_without_act",
"valueIsInherited": false,
"value": [
{
"activity": null,
"allowed": [
{
"groupName": "Anonyme Besucher",
"groupPath": "/GroupsFile/2"
}
],
"forbidden": [
{
"groupName": "Registrierte Mitglieder",
"groupPath": "/GroupsFile/3"
},
{
"groupName": "Kunden",
"groupPath": "/GroupsFile/4"
}
]
}
]
}

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.4 | Data privacy