Start page / Template development / Forms / Input components / PERMISSION

CMS_INPUT_PERMISSION

Contents
for example
to the methods: Permissions
CMS_INPUT_PERMISSION

CMS_INPUT_PERMISSION

The input component CMS_INPUT_PERMISSION is a special component which can be used to assign user permissions. The permissions are assigned on the basis of a hierarchical group definition.

group
String
Mandatory
name
Designator
Mandatory
allowEmpty
YesNo
Optional parameters
autoSave
YesNo
Optional parameters
convertEntities
ConvertEntity
Optional parameters
hFill
YesNo
Optional parameters
hidden
YesNo
Optional parameters
noBreak
YesNo
Optional parameters
onClick
String
Optional parameters
onLoad
String
Optional parameters
onSave
String
Optional parameters
preset
Preset
Optional parameters
priority
Priority
Optional parameters
searchRelevancy
Relevancy
Optional parameters
name
String
Mandatory
lang
LanguageAbbreviation
Mandatory
description
String
Optional parameters
label
String
Optional parameters
lang
LanguageAbbreviation
Mandatory
description
String
Optional parameters
label
String
Optional parameters
script
String
Optional parameters
lang
LanguageAbbreviation
Mandatory
description
String
Optional parameters
label
String
Optional parameters

Parameter

The following table gives the parameters of the PERMISSION input component.

ParameterMandatorySinceTypeDefault value
group*Yes3.1StringNone
name*Yes3.1DesignatorNone
allowEmptyNo3.0YesNoYES
autoSaveNo3.1YesNoNO
convertEntitiesNo2.0ConvertEntityNONE
hFillNo2.0YesNoNO
hiddenNo4.0.44YesNoNO
noBreakNo2.0YesNoNO
onClickNo3.1StringNone
onLoadNo3.1StringNone
onSaveNo3.1StringNone
presetNo4.0PresetDEFAULT
priorityNo3.1PriorityALLOW
searchRelevancyNo5.2.305RelevancyDEFAULT

group

The permission group.

ParameterMandatorySinceTypeDefault value
group*Yes3.1StringNone

name

The attribute "name" is the variable name of an input component with which the the result object of the input component can be used in the templates - with the help of $CMS_VALUE()$ - or the content can be output.

ParameterMandatorySinceTypeDefault value
name*Yes3.1DesignatorNone

allowEmpty

The "allowEmpty" parameter is used to specify whether a value has to be entered for an input value or not.

If allowEmpty="YES" input is not mandatory; however, it is if allowEmpty="NO".

Input components with allowEmpty="NO" are also called mandatory input components.

The default value for allowEmpty is YES.

ParameterMandatorySinceTypeDefault value
allowEmptyNo3.0YesNoYES

autoSave

Switch to turn auto save on or off.

ParameterMandatorySinceTypeDefault value
autoSaveNo3.1YesNoNO

convertEntities

The "convertEntities" attribute is used to convert special characters entered in the input component for output in HTML characters.

There are three forms:

  • convertEntities="NONE" (standard)
  • convertEntities="STANDARD"
  • convertEntities="QUOTE"

With the NONE form, no conversion rules whatsoever are applied.

If STANDARD is given the conversion rules in the "convert" area of the selected conversion rule of the template set are applied.

The form QUOTE explicitly includes STANDARD too. However, the "quote" area of the conversion rule is also applied.

ParameterMandatorySinceTypeDefault value
convertEntitiesNo2.0ConvertEntityNONE

hFill

An input component is always displayed with a pre-defined width.

However, if the input component is to use the full available display width the parameter hFill must be given with the value YES .

ParameterMandatorySinceTypeDefault value
hFillNo2.0YesNoNO

hidden

With the "hidden" parameter an input component can be hidden from the editor.

If hidden="YES" the input component is not visible for the editor, if hidden="NO" it is visible.

The default value for hidden is NO.

ParameterMandatorySinceTypeDefault value
hiddenNo4.0.44YesNoNO

noBreak

The noBreak parameter can be used to suppress automatic line break after an input component.

The noBreak parameter must be given with value "YES" (noBreak="YES") to suppress the automatic line break.

ParameterMandatorySinceTypeDefault value
noBreakNo2.0YesNoNO

onClick

Name of validation script to be executed on click.

ParameterMandatorySinceTypeDefault value
onClickNo3.1StringNone

onLoad

Name of validation script to be executed on load.

ParameterMandatorySinceTypeDefault value
onLoadNo3.1StringNone

onSave

Name of validation script to be executed on save.

ParameterMandatorySinceTypeDefault value
onSaveNo3.1StringNone

preset

Using the preset attribute the handling of default values in an input component can defined (see also chapter Default values). If preset="default" is set, the fall-back value defined in the form is used. If this value in the form is changed later on, these changes will be affect all usages of this default value in the input components maintained by the editor, as long as a value will be set manually in the input component. This is the default setting. If preset="copy" is set, the value entered by the editor is copied directly into the input component. Subsequent changes to the default value in the form do not have any effect on the usages of this default value in the input components maintained by the editor.

Important For the input element CMS_INPUT_PERMISSION the definition of default values is not recommended. Default values could cause variations between the display and the output of the input element.

ParameterMandatorySinceTypeDefault value
presetNo4.0PresetDEFAULT

priority

Permission priority.

ParameterMandatorySinceTypeDefault value
priorityNo3.1PriorityALLOW

searchRelevancy

This parameter can be used for determining the weighting of content of this input component in search results (SiteArchitect: Global search (→Documentation FirstSpirit SiteArchitect), search in data sources | ContentCreator: search in report area). For example, using this parameter, template developers may specify that elements that contain a search term in a headline input component should be displayed more prominently in search results than elements that only contain the search term in a body text input component. Additionally, contents of individual input components may be configured so that they be ignored during indexing for search, which may increase indexing performance.
Input components may be configured with the following values to specify their contents' weight in search indexing:

  • none: The contents of an input component that is configured with this search relevancy value will not be indexed. Pages, sections, and datasets which contain contents in input components configured with this search relevancy value will not appear in search results if the search term only appears in these input components. Searching for contents of such input components using drag-and-drop will yield no results ("The field is not eligible for search, as it is marked non-relevant for searching."). Such fields are also marked accordingly in "Simple Search" in data sources ("Not eligible for searching.").
  • default: The input component's content receives default weight in the search index (default setting).
  • high: The contents of an input component that is configured with this search relevancy value will be displayed more prominently in search results (exception: search for datasets). This means that if a search term appears in both an element with an input component configured with high search relevancy and an element with an input component configured with default search relevancy, the element which contains the search term in a high-relevancy input component will be shown in a higher position in search results.

If the parameter is not specified for an input component, the component's contents will be indexed with a default weight (searchRelevancy="default").

Note: Header fields of snippets (tab Snippet in templates, "Label" field) are also indexed. If an input component is configured with a weighting none (searchRelevancy="none") but its value is included in the template's snippet header field, searching for the input component's value will cause the associated element to appear in search results

Changing the weighting setting of an input component in a template does not immediately affect existing elements based upon that template, and search results will continue to reflect the old weighting until elements based upon that template are modified (at which time they will be reindexed in the background). Alternatively, the entire project or parts of it may be reindexed via a schedule task or the FirstSpirit APIs, which does not require elements to be changed (see FirstSpirit Manual for Administrators, Chapter "Rebuild search index (→Documentation for Administrators)"). However, reindexing large numbers of elements is memory and CPU-intensive and should only be performed during a planned maintenance period!

For further information, see

  • interface GomSearchRelevancy (package de.espirit.firstspirit.access.store.templatestore.gom, FirstSpirit Access API)
  • interface SearchService (package de.espirit.firstspirit.access.search, FirstSpirit Access API)
  • interface QueryAgent (package de.espirit.firstspirit.agency, FirstSpirit Access API)

ParameterMandatorySinceTypeDefault value
searchRelevancyNo5.2.305RelevancyDEFAULT

ACTIVITIESAvailable from FirstSpirit Version 3.1

Activities definitions.

ACTIVITYAvailable from FirstSpirit Version 4.0

Language info providing named element.

ParameterMandatorySinceTypeDefault value
name*Yes2.0StringNone

name

The entry's name.

ParameterMandatorySinceTypeDefault value
name*Yes2.0StringNone

LANGINFOSAvailable from FirstSpirit Version 3.1

Using the tag LANGINFOS language-dependent information can be defined for each input component, e.g. which title is to be used for the input component in the different project languages (parameter label), which tooltip is to be displayed (parameter description) etc. For reasons of clarity, definitions which are identical in multiple languages will be merged. For example,

<LANGINFOS> 
<LANGINFO lang="*" label="Datum"/>
<LANGINFO lang="DE" label="Datum"/>
<LANGINFO lang="EN" label="Datum"/>
</LANGINFOS>

will be merged to

 <LANGINFOS> 
<LANGINFO lang="*" label="Datum"/>
</LANGINFOS>

after saving.

Available from FirstSpirit Version 4.2R2 Up to and including FirstSpirit version 4.2R2 language definitions will be deleted only in the case if the values are identical in all languages (as in example above). Furthermore, only the parameters lang, description and label are taken into account when merging.

Available from FirstSpirit Version 4.2R4 Since FirstSpirit version 4.2R4 all parameters are taken into account (e.g. format and length). Furthermore, language definitions are also merged within LANGINFOS tags, if they are identical in at least two languages. For example,

<LANGINFOS> 
<LANGINFO lang="*" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="DE" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="EN" label="Date" format="MM/dd/yy"/>
</LANGINFOS>

will become

 <LANGINFOS> 
<LANGINFO lang="*" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="EN" label="Date" format="MM/dd/yy"/>
</LANGINFOS>

after saving.

The definition for the fallback value (*) will not be deleted in any case. If there are two or more language definitions with identical values the first one will be maintained, the other will be deleted.

Available from FirstSpirit Version 4.2R2 IMPORTANT: Up to and including FirstSpirit version 4.2R2 at least one definition for the fallback labelling ("*") must be given:

<LANGINFOS>
<LANGINFO lang="*" label="TEXT"/>
</LANGINFOS>

Available from FirstSpirit Version 4.2R4 From FirstSpirit version 4.2R4 the fallback definition can be omitted. In this case, the language which is defined first will be used automatically as fallback value. For example,

<LANGINFOS>
<LANGINFO lang="EN" label="Date"/>
<LANGINFO lang="DE" label="Datum"/>
</LANGINFOS>

will become

 <LANGINFOS> 
<LANGINFO lang="*" label="Date"/>
<LANGINFO lang="DE" label="Datum"/>
</LANGINFOS>

after saving.

LANGINFOAvailable from FirstSpirit Version 3.1

The LANGINFO tag is used to give values or attributes for a language as well for use as fallback values.

In order to state values or attributes for a language it is necessary to give the abbreviation of the project language in the lang parameter:

...
<LANGINFO lang="DE".../>
...

Fallback values are given with the special language abbreviation * ("for all languages"):

...
<LANGINFO lang="*".../>
...

The lang parameter is a mandatory parameter.

ParameterMandatorySinceTypeDefault value
lang*Yes3.1LanguageAbbreviationNone
descriptionNo3.1StringNone
labelNo3.1StringNone

lang

The lang parameter is used to give the language abbreviation which is entered in the server properties see Language templates (→Documentation for Administrators)) to specify for which project languages the definitions are to apply, e.g. DE for German, EN for English, FR for French etc. The following characters can be used as often as required: -, _, 0-9 and A-Z. Lower case letters are transformed automatically into upper case letters after having saved the template. In addition * can be used for fallback values.

ParameterMandatorySinceTypeDefault value
lang*Yes3.1LanguageAbbreviationNone

description

The description parameter can be used to specify a description of how the input component is to be used and filled by the editor. The text defined here is displayed as a tooltip on mouse-over at the relevant input component.

The text should serve as a guide for the editor and be as short as possible, understandable and relevant. It should match the label (label parameter) and complement it appropriately.
Make sure to use terminology that the editor knows and expects.

Example:

...description="Please enter the text for the headline here (H1)."...

Tip: If you would like to know how to better support and guide editors when filling input components, take a look at the chapter on Rules and other parameters and functions of forms.

ParameterMandatorySinceTypeDefault value
descriptionNo3.1StringNone

label

Use the label parameter to define the label of the input component.

Choose a label that is as short and meaningful as possible.
In combination with a relevant description (description parameter), you can help the editor to use the input component correctly and successfully.

Example:

... label="Headline (H1)" ...

ParameterMandatorySinceTypeDefault value
labelNo3.1StringNone

BUTTONSAvailable from FirstSpirit Version 3.1

Script button definitions.

BUTTONAvailable from FirstSpirit Version 4.0

Script button definition container.

ParameterMandatorySinceTypeDefault value
None

LANGINFOSAvailable from FirstSpirit Version 3.1

Using the tag LANGINFOS language-dependent information can be defined for each input component, e.g. which title is to be used for the input component in the different project languages (parameter label), which tooltip is to be displayed (parameter description) etc. For reasons of clarity, definitions which are identical in multiple languages will be merged. For example,

<LANGINFOS> 
<LANGINFO lang="*" label="Datum"/>
<LANGINFO lang="DE" label="Datum"/>
<LANGINFO lang="EN" label="Datum"/>
</LANGINFOS>

will be merged to

 <LANGINFOS> 
<LANGINFO lang="*" label="Datum"/>
</LANGINFOS>

after saving.

Available from FirstSpirit Version 4.2R2 Up to and including FirstSpirit version 4.2R2 language definitions will be deleted only in the case if the values are identical in all languages (as in example above). Furthermore, only the parameters lang, description and label are taken into account when merging.

Available from FirstSpirit Version 4.2R4 Since FirstSpirit version 4.2R4 all parameters are taken into account (e.g. format and length). Furthermore, language definitions are also merged within LANGINFOS tags, if they are identical in at least two languages. For example,

<LANGINFOS> 
<LANGINFO lang="*" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="DE" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="EN" label="Date" format="MM/dd/yy"/>
</LANGINFOS>

will become

 <LANGINFOS> 
<LANGINFO lang="*" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="EN" label="Date" format="MM/dd/yy"/>
</LANGINFOS>

after saving.

The definition for the fallback value (*) will not be deleted in any case. If there are two or more language definitions with identical values the first one will be maintained, the other will be deleted.

Available from FirstSpirit Version 4.2R2 IMPORTANT: Up to and including FirstSpirit version 4.2R2 at least one definition for the fallback labelling ("*") must be given:

<LANGINFOS>
<LANGINFO lang="*" label="TEXT"/>
</LANGINFOS>

Available from FirstSpirit Version 4.2R4 From FirstSpirit version 4.2R4 the fallback definition can be omitted. In this case, the language which is defined first will be used automatically as fallback value. For example,

<LANGINFOS>
<LANGINFO lang="EN" label="Date"/>
<LANGINFO lang="DE" label="Datum"/>
</LANGINFOS>

will become

 <LANGINFOS> 
<LANGINFO lang="*" label="Date"/>
<LANGINFO lang="DE" label="Datum"/>
</LANGINFOS>

after saving.

LANGINFOAvailable from FirstSpirit Version 3.1

The LANGINFO tag is used to give values or attributes for a language as well for use as fallback values.

In order to state values or attributes for a language it is necessary to give the abbreviation of the project language in the lang parameter:

...
<LANGINFO lang="DE".../>
...

Fallback values are given with the special language abbreviation * ("for all languages"):

...
<LANGINFO lang="*".../>
...

The lang parameter is a mandatory parameter.

ParameterMandatorySinceTypeDefault value
lang*Yes3.1LanguageAbbreviationNone
descriptionNo3.1StringNone
labelNo3.1StringNone
scriptNo3.1StringNone

lang

The lang parameter is used to give the language abbreviation which is entered in the server properties see Language templates (→Documentation for Administrators)) to specify for which project languages the definitions are to apply, e.g. DE for German, EN for English, FR for French etc. The following characters can be used as often as required: -, _, 0-9 and A-Z. Lower case letters are transformed automatically into upper case letters after having saved the template. In addition * can be used for fallback values.

ParameterMandatorySinceTypeDefault value
lang*Yes3.1LanguageAbbreviationNone

description

The description parameter can be used to specify a description of how the input component is to be used and filled by the editor. The text defined here is displayed as a tooltip on mouse-over at the relevant input component.

The text should serve as a guide for the editor and be as short as possible, understandable and relevant. It should match the label (label parameter) and complement it appropriately.
Make sure to use terminology that the editor knows and expects.

Example:

...description="Please enter the text for the headline here (H1)."...

Tip: If you would like to know how to better support and guide editors when filling input components, take a look at the chapter on Rules and other parameters and functions of forms.

ParameterMandatorySinceTypeDefault value
descriptionNo3.1StringNone

label

Use the label parameter to define the label of the input component.

Choose a label that is as short and meaningful as possible.
In combination with a relevant description (description parameter), you can help the editor to use the input component correctly and successfully.

Example:

... label="Headline (H1)" ...

ParameterMandatorySinceTypeDefault value
labelNo3.1StringNone

script

Language dependent script setting.

ParameterMandatorySinceTypeDefault value
scriptNo3.1StringNone

LANGINFOSAvailable from FirstSpirit Version 4.0

Using the tag LANGINFOS language-dependent information can be defined for each input component, e.g. which title is to be used for the input component in the different project languages (parameter label), which tooltip is to be displayed (parameter description) etc. For reasons of clarity, definitions which are identical in multiple languages will be merged. For example,

<LANGINFOS> 
<LANGINFO lang="*" label="Datum"/>
<LANGINFO lang="DE" label="Datum"/>
<LANGINFO lang="EN" label="Datum"/>
</LANGINFOS>

will be merged to

 <LANGINFOS> 
<LANGINFO lang="*" label="Datum"/>
</LANGINFOS>

after saving.

Available from FirstSpirit Version 4.2R2 Up to and including FirstSpirit version 4.2R2 language definitions will be deleted only in the case if the values are identical in all languages (as in example above). Furthermore, only the parameters lang, description and label are taken into account when merging.

Available from FirstSpirit Version 4.2R4 Since FirstSpirit version 4.2R4 all parameters are taken into account (e.g. format and length). Furthermore, language definitions are also merged within LANGINFOS tags, if they are identical in at least two languages. For example,

<LANGINFOS> 
<LANGINFO lang="*" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="DE" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="EN" label="Date" format="MM/dd/yy"/>
</LANGINFOS>

will become

 <LANGINFOS> 
<LANGINFO lang="*" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="EN" label="Date" format="MM/dd/yy"/>
</LANGINFOS>

after saving.

The definition for the fallback value (*) will not be deleted in any case. If there are two or more language definitions with identical values the first one will be maintained, the other will be deleted.

Available from FirstSpirit Version 4.2R2 IMPORTANT: Up to and including FirstSpirit version 4.2R2 at least one definition for the fallback labelling ("*") must be given:

<LANGINFOS>
<LANGINFO lang="*" label="TEXT"/>
</LANGINFOS>

Available from FirstSpirit Version 4.2R4 From FirstSpirit version 4.2R4 the fallback definition can be omitted. In this case, the language which is defined first will be used automatically as fallback value. For example,

<LANGINFOS>
<LANGINFO lang="EN" label="Date"/>
<LANGINFO lang="DE" label="Datum"/>
</LANGINFOS>

will become

 <LANGINFOS> 
<LANGINFO lang="*" label="Date"/>
<LANGINFO lang="DE" label="Datum"/>
</LANGINFOS>

after saving.

LANGINFOAvailable from FirstSpirit Version 3.1

The LANGINFO tag is used to give values or attributes for a language as well for use as fallback values.

In order to state values or attributes for a language it is necessary to give the abbreviation of the project language in the lang parameter:

...
<LANGINFO lang="DE".../>
...

Fallback values are given with the special language abbreviation * ("for all languages"):

...
<LANGINFO lang="*".../>
...

The lang parameter is a mandatory parameter.

ParameterMandatorySinceTypeDefault value
lang*Yes3.1LanguageAbbreviationNone
descriptionNo3.1StringNone
labelNo3.1StringNone

lang

The lang parameter is used to give the language abbreviation which is entered in the server properties see Language templates (→Documentation for Administrators)) to specify for which project languages the definitions are to apply, e.g. DE for German, EN for English, FR for French etc. The following characters can be used as often as required: -, _, 0-9 and A-Z. Lower case letters are transformed automatically into upper case letters after having saved the template. In addition * can be used for fallback values.

ParameterMandatorySinceTypeDefault value
lang*Yes3.1LanguageAbbreviationNone

description

The description parameter can be used to specify a description of how the input component is to be used and filled by the editor. The text defined here is displayed as a tooltip on mouse-over at the relevant input component.

The text should serve as a guide for the editor and be as short as possible, understandable and relevant. It should match the label (label parameter) and complement it appropriately.
Make sure to use terminology that the editor knows and expects.

Example:

...description="Please enter the text for the headline here (H1)."...

Tip: If you would like to know how to better support and guide editors when filling input components, take a look at the chapter on Rules and other parameters and functions of forms.

ParameterMandatorySinceTypeDefault value
descriptionNo3.1StringNone

label

Use the label parameter to define the label of the input component.

Choose a label that is as short and meaningful as possible.
In combination with a relevant description (description parameter), you can help the editor to use the input component correctly and successfully.

Example:

... label="Headline (H1)" ...

ParameterMandatorySinceTypeDefault value
labelNo3.1StringNone
Key

Designator

Unique identifier of variable length; must start with a letter or underscore and may only contain the characters "A-Z", "a-z", "0-9" and "_", e.g. "fr_st_varName"

Relevancy

Definition of relevancy for search

NONEAvailable from FirstSpirit Version 5.2.305

Irrelevant

DEFAULTAvailable from FirstSpirit Version 5.2.305

Normal relevance

HIGHAvailable from FirstSpirit Version 5.2.305

High relevance

Preset

How to deal with default values

CopyAvailable from FirstSpirit Version 4.0

The value entered by the editor is copied directly into the input component, subsequent changes do not have any effect

DefaultAvailable from FirstSpirit Version 4.0

The fall-back value defined in the form is used, as long as a value will be set manually

Priority

Priority for permissions.

ALLOWAvailable from FirstSpirit Version 3.1

Restricting selection of element types

DENYAvailable from FirstSpirit Version 3.1

Deny priority

String

A random character string

YesNo

Switch to apply an attribute or not

NOAvailable from FirstSpirit Version 2.0

Do not apply attribute

YESAvailable from FirstSpirit Version 2.0

Apply attribute

ConvertEntity

Switch with which to define the conversion rule

NONEAvailable from FirstSpirit Version 2.0

Do not use any conversion rules

STANDARDAvailable from FirstSpirit Version 2.0

Use the conversion rules of the "convert" area

QUOTEAvailable from FirstSpirit Version 2.1

Use the conversion rules of the "convert" and "quote" area

LanguageAbbreviation

Language abbreviation, e.g. DE, EN, FR or * for return values

Example

An example of the input component PERMISSION:

<CMS_INPUT_PERMISSION group="GROUP IDENTIFIER" hFill="YES" name="IDENTIFIER">
<ACTIVITIES>
<ACTIVITY name="IDENTIFIER"/>
<ACTIVITY name="IDENTIFIER"/>
<ACTIVITY name="IDENTIFIER"/>
</ACTIVITIES>
<LANGINFOS>
<LANGINFO lang="*" label="TEXT_FALLBACK" description="TEXT_FALLBACK"/>
<LANGINFO lang="DE" label="TEXT_DE" description="TEXT_DE"/>
<LANGINFO lang="EN" label="TEXT_EN" description="TEXT_EN"/>
</LANGINFOS>
</CMS_INPUT_PERMISSION>

Example of use in the template syntax

An example of using the permission-component meta_perm:

<html>
<head>
$CMS_IF(!#global.preview)$
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="FIRSTpersonalisation" prefix="fsp" %>
$CMS_END_IF$
</head>

<body>
$CMS_SET(currPerm, #global.node.meta("meta_perm", "inherit"))$

$CMS_IF(!#global.preview)$
<fsp:isAuthorized userRange="loggedIn" groups="$CMS_IF(!currPerm.isEmpty)$$CMS_VALUE(currPerm.getAllowed("Allowed").toString(","))$$CMS_END_IF$">
logged in
</fsp:isAuthorized>
$CMS_END_IF$

$CMS_IF(!#global.preview)$
<fsp:isNotAuthorized userRange="loggedIn" groups="$CMS_IF(!currPerm.isEmpty)$$CMS_VALUE(currPerm.getAllowed("Allowed").toString(","))$$CMS_END_IF$">
not logged in
</fsp:isNotAuthorized>
$CMS_END_IF$
</body>
</html>

In this example the values of the CMS_INPUT_PERMISSION-Component “meta-perm”, which is displayed inside the metadata, are saved in the term “currPerm”. With the tags “<fsp:isAuthorized/>” and “<fsp:isNotAuthorized/>” there will be displayed different content for logged in and not logged in users. The term “fsp” is the prefix, which is defined in the pageheader. With the parameters “userRange” and “groups” it is possible to create a query, if the user is logged in and member of one of the metadata-groups. If the result of the query is positive (the user is authorized), the user will see the content for logged in user, else the user will see the content for not logged in users.

The used tags and the in the pageheader referenced library are part of the DynamicPersonalization-Modul and are explained in detail in the related documentation.

Evaluating via FirstSpirit API

Interfaces

User permissions can also be evaluated via FirstSpirit API.

The API is accessed via the Permissions object, which returns the permissions that have been defined on the current FirstSpirit object.

FirstSpirit Access API: de.espirit.firstspirit.access.editor.value.Permissions

FirstSpirit Access API manual: Permissions

If no permissions have been defined within the input component (“Define permissions” option is deactivated for the input component), the Permissions object returns an empty list – even if the input component is displaying user permissions that have been inherited from a higher-level node.

Important This behavior must be taken into account when evaluating via the API. Before querying the content, a check should always be carried out to see whether metadata has been defined for this element and whether these permissions have been set there or inherited (see Evaluating user permissions via the API (→Documentation FirstSpirit SiteArchitect)).

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