| Quintiq file version 2.0 | 
| #parent: Toolbar/ButtonOk | 
| Response OnClick () id:Response_Toolbar_ButtonOk_OnClick | 
| { | 
|   #keys: '[11660.0.16637272]' | 
|   Body: | 
|   [* | 
|     // Assign scenario authorization | 
|     if ( CheckBox.Checked() ) | 
|     { | 
|       username := ApplicationLibMacroPlanner.GetUserName(); | 
|       groupnames := construct( Strings ); | 
|       traverse( ScenarioManager_DialogEditScenarioAuthorization.Data(), ScenarioAuthorization, ug ) | 
|       { | 
|         groupnames.Add( ug.Name() ); | 
|       } | 
|       Dialog.Data().AuthorizeAllChildren( groupnames, username ); | 
|     } | 
|     Dialog.EndModal( 1 ); | 
|   *] | 
|   DefinitionID: 'Responsedef_GUIButtonBase_OnClick' | 
|   Precondition: | 
|   [* | 
|     return true | 
|   *] | 
|   UserRequiresReadWrite: true | 
| } |