1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| Quintiq file version 2.0
| #parent: #root
| Method IsAuthorized (
| Scenarios scenarios,
| Scenario scenario
| ) declarative remote as Boolean
| {
| Description: 'Identify if the scenario is authorized'
| TextBody:
| [*
| // ju jinn Mar-14-2014 (created)
| /* desmondt: we need to check both because this is a share method where used by DataHolderActiveScenario and DataHolderFocusedScenario
| (Scenario activity list and the button at the toolbar) */
|
| value := false;
|
| if( not isnull( scenarios ) )
| {
| value := exists( scenarios, Elements.ScenarioAuthorization, scenarioauthorization, scenarioauthorization = this, true );
| }
| else
| {
| value := exists( scenario, ScenarioAuthorization, scenarioauthorization, scenarioauthorization = this, true );
| }
|
| return value;
| *]
| }
|
|