documentation:2.1:exportedvars

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

documentation:2.1:exportedvars [2019/01/15 15:55] (current)
Line 1: Line 1:
 +====== Exported variables ======
 +
 +===== Presentation =====
 +
 +Exported variables are the variables available to [[writingrulesand_headers|write rules and headers]]. They are extracted from the users database by the [[start#authentication_users_and_password_databases|users module]].
 +
 +To create a variable, you've just to map a user attributes in LL::NG using ''Variables'' ยป ''Exported variables''. For each variable, The first field is the name which will be used in rules, macros or headers and the second field is the name of the user database field.
 +
 +Examples for [[authldap|LDAP]]:
 +^  Variable name  ^  LDAP attribute  ^
 +|  uid  |  uid  |
 +|  number  |  employeeNumber  |
 +|  name  |  sn  |
 +
 +You can define exported variables for each module in the module configuration itself. Variables defined in the main ''Exported variables'' will be used for each backend. Variables defined in the exported variables node of the module will be used only for that module.
 +
 +{{ :documentation:manager-exported-variables.png?nolink |Exported variables in the Manager}}
 +
 +<note tip>You can define environment variables in ''Exported variables'', this allows one to populate user session with some environment values. Environment variables will not be queried in users database.</note>
 +
 +===== Extend variables using macros and groups =====
 +
 +{{page>performances#macros_and_groups&noheader}}