| 1 |
Grant Session |
| 2 |
============= |
| 3 |
|
| 4 |
Presentation |
| 5 |
------------ |
| 6 |
|
| 7 |
The goal of this plugin is to evaluate different conditions before |
| 8 |
allowing a user to open a session on the portal. When a condition is not |
| 9 |
met, then the user is prompted with a customized message. |
| 10 |
|
| 11 |
Configuration |
| 12 |
------------- |
| 13 |
|
| 14 |
This plugin is enabled by default. |
| 15 |
|
| 16 |
To configure rules, go in ``General Parameters`` > ``Sessions`` > |
| 17 |
``Opening conditions``. |
| 18 |
|
| 19 |
You can then create rules with these fields: |
| 20 |
|
| 21 |
- **Comment**: a label for your rule, than can be used to order it |
| 22 |
(rules are evaluated by alphabetical order). |
| 23 |
- **Rule**: The condition that will be evaluated. If this condition |
| 24 |
does not return true, then the session is refused. |
| 25 |
- **Message**: A *Perl expression* that is evaluated and displayed to the user |
| 26 |
when the rule does not match. It can contain session data as user attributes |
| 27 |
or macros. **Don't forget to quote the text.** |
| 28 |
|
| 29 |
.. tip:: |
| 30 |
|
| 31 |
By example, you can set a message like this (including quotes): |
| 32 |
"hello $uid your are not allowed to login" |