| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 | | Quintiq file version 2.0 |  | #parent: #root |  | MethodOverride IsVisible ( |  |   structured_UserGroupDefinition usergroup, |  |   Boolean showdeleted, |  |   String username |  | ) declarative remote as Boolean |  | { |  |   Description: 'Identify if the scenario is visible, return true if it is visible' |  |   TextBody: |  |   [* |  |     // ying ying Jan-24-2011 (created) |  |     visibleasselection := ( this.IsLoaded() or showdeleted ) |  |     notdeleted := ( not this.IsDeleted() or showdeleted ) |  |     haspermission := ( this.CreatedBy() = username |  |                        or exists( this, ScenarioAuthorization, auth, exists( usergroup, Elements, e, e.Name() = auth.Name() ) ) ) |  |      |  |     value := visibleasselection and notdeleted and haspermission; |  |      |  |     return value; |  |   *] |  | } | 
 |