added active directory support to security groups

This commit is contained in:
Infineon\StieberD
2024-11-01 17:59:22 -07:00
parent 2fa803e3a1
commit 2ad0386055
25 changed files with 7835 additions and 6559 deletions

View File

@ -37,11 +37,12 @@ $Insert APP_INSERTS
$Insert MSG_EQUATES
$Insert POPUP_EQUATES
$Insert NOTIFICATION_EQUATES
$Insert LSL_USERS_EQUATES
EQU READONLY_GREEN$ TO 192 + (220*256) + (192*65536)
Declare function Admin_User, Database_Services, Error_Services, Active_Directory_Services, SRP_Array
Declare subroutine PlaceDialog, Error_Services, Database_Services, Btree.Extract
Declare subroutine PlaceDialog, Error_Services, Database_Services, Btree.Extract, ErrMsg
GoToEvent Event for CtrlEntId else
// Event not implemented
@ -54,98 +55,172 @@ Return EventFlow or 1
//-----------------------------------------------------------------------------
Event WINDOW.CREATE(CreateParam)
PlaceDialog(-2, -2)
ColorArray = Send_Message(@Window:'.EDT_LSL_USERS', "COLOR_BY_POS", 2, 0)
ColorArray<1> = READONLY_GREEN$
Send_Message(@Window:'.EDT_LSL_USERS', "COLOR_BY_POS", 1, 0, ColorArray)
Send_Message(@Window:'.EDT_LSL_USERS', "COLOR_BY_POS", 2, 0, ColorArray)
Send_Message(@Window:'.EDT_AD_GROUPS', "COLOR_BY_POS", 1, 0, ColorArray)
Send_Message(@Window:'.EDT_AD_GROUPS', "COLOR_BY_POS", 2, 0, ColorArray)
Send_Message(@Window:'.EDT_AD_GROUPS', "COLOR_BY_POS", 3, 0, ColorArray)
AdminUser = Xlate('LSL_USERS', @USER4, LSL_USERS_ADMIN_USER$, 'X')
If AdminUser then
ErrMsg('You do not have the proper security to enter Message Notifications...' )
Post_Event(@Window, 'CLOSE')
end else
PlaceDialog(-2, -2)
ColorArray = Send_Message(@Window:'.EDT_LSL_USERS', "COLOR_BY_POS", 2, 0)
ColorArray<1> = READONLY_GREEN$
Send_Message(@Window:'.EDT_LSL_USERS', "COLOR_BY_POS", 1, 0, ColorArray)
Send_Message(@Window:'.EDT_LSL_USERS', "COLOR_BY_POS", 2, 0, ColorArray)
Send_Message(@Window:'.EDT_AD_GROUPS', "COLOR_BY_POS", 1, 0, ColorArray)
Send_Message(@Window:'.EDT_AD_GROUPS', "COLOR_BY_POS", 2, 0, ColorArray)
Send_Message(@Window:'.EDT_AD_GROUPS', "COLOR_BY_POS", 3, 0, ColorArray)
end
End Event
Event WINDOW.READ()
Key = Get_Property(@Window:'.EDL_NOTIFICATION_ID', 'TEXT')
Begin Case
Case Key EQ ''
Set_Property(@Window:'.EDT_LSL_USERS', 'ENABLED', False$)
Case RowExists('NOTIFICATION', Key)
// Populate form
HaveLock = Database_Services('GetKeyIDLock', 'NOTIFICATION', Key, True$)
If HaveLock then
Set_Property(@Window, '@HAVE_LOCK', HaveLock)
Set_Property(@Window, '@LOCK_KEY', Key)
Set_Property(@Window:'.EDL_DESCRIPTION', 'ENABLED', True$)
Set_Property(@Window:'.CHK_USE_AD', 'ENABLED', True$)
Set_Property(@Window:'.CHK_LIMIT_TO_ACTIVE_SHIFT', True$)
Set_Property(@Window:'.PUB_CLEAR', 'ENABLED', True$)
Set_Property(@Window:'.PUB_DELETE', 'ENABLED', True$)
Set_Property(@Window:'.PUB_SAVE', 'ENABLED', True$)
NotifyRec = Database_Services('ReadDataRow', 'NOTIFICATION', Key)
If Error_Services('NoError') then
Set_Property(@Window, '@RECORD', NotifyRec)
Set_Property(@Window:'.EDL_DESCRIPTION', 'TEXT', NotifyRec<NOTIFICATION_DESC$>)
UseAD = NotifyRec<NOTIFICATION_USE_ACTIVE_DIRECTORY$>
Set_Property(@Window:'.CHK_USE_AD', 'DEFPROP', UseAD)
LimitOnShift = NotifyRec<NOTIFICATION_LIMIT_TO_ACTIVE_SHIFT$>
Set_Property(@Window:'.CHK_LIMIT_TO_ACTIVE_SHIFT', 'DEFPROP', LimitOnShift)
EventFlow = EVENT_CONTINUE$
OrigRec = Get_Property(@Window, '@RECORD')
EditRec = Get_Property(@Window, '@EDIT_RECORD')
If OrigRec NE EditRec then
Response = Msg(@Window, '', 'YES_NO_CANCEL', '', 'OpenInsight':@FM:'Would you like to save changes to the entry?')
Begin Case
Case Response EQ Yes$
// Save changes and read new record
NewKey = Get_Property(@Window:'.EDL_NOTIFICATION_ID', 'TEXT')
Set_Property(@Window, '@NEW_KEY', NewKey)
Send_Event(@Window, 'WRITE')
Case Response EQ No$
// Abandon changes and read new form
Null
Case Otherwise$
// Cancel - Stop Read Event
EventFlow = EVENT_STOP$
End Case
end
If EventFlow EQ EVENT_CONTINUE$ then
GoSub UnlockRec
Key = Get_Property(@Window:'.EDL_NOTIFICATION_ID', 'TEXT')
NewRec = Get_Property(@Window, '@NEW_REC')
If Key EQ '' then
Key = Get_Property(@Window, '@NEW_KEY')
Set_Property(@Window:'.EDL_NOTIFICATION_ID', 'TEXT', NewKey)
Set_Property(@Window, '@NEW_KEY', '')
end
Begin Case
Case Key EQ ''
Set_Property(@Window:'.EDT_LSL_USERS', 'ENABLED', False$)
Case RowExists('NOTIFICATION', Key)
// Populate form
HaveLock = Database_Services('GetKeyIDLock', 'NOTIFICATION', Key, True$)
If HaveLock then
Set_Property(@Window, '@HAVE_LOCK', HaveLock)
Set_Property(@Window, '@LOCK_KEY', Key)
LSLUsers = NotifyRec<NOTIFICATION_USER_ID$>
LSLUsernames = Xlate('LSL_USERS', LSLUsers, 'FIRST_LAST', 'X')
LSLUsersArray = LSLUsers : @FM : LSLUsernames
Set_Property(@Window:'.EDT_LSL_USERS', 'ARRAY', LSLUsersArray)
ADGroups = NotifyRec<NOTIFICATION_ACTIVE_DIRECTORY_GROUPS$>
GroupList = ''
If ADGroups NE '' then
For each ADGroup in ADGroups using @VM setting vPos
GroupList<-1> = Active_Directory_Services('GetADGroupsByString', ADGroup, 'INFINEON')
Next ADGroup
Set_Property(@Window:'.EDL_DESCRIPTION', 'ENABLED', True$)
Set_Property(@Window:'.CHK_USE_AD', 'ENABLED', True$)
Set_Property(@Window:'.CHK_LIMIT_TO_ACTIVE_SHIFT', True$)
Set_Property(@Window:'.PUB_CLEAR', 'ENABLED', True$)
Set_Property(@Window:'.PUB_DELETE', 'ENABLED', True$)
Set_Property(@Window:'.PUB_SAVE', 'ENABLED', True$)
NotifyRec = Database_Services('ReadDataRow', 'NOTIFICATION', Key)
If Error_Services('NoError') then
Set_Property(@Window, '@RECORD', NotifyRec)
Set_Property(@Window, '@EDIT_RECORD', NotifyRec)
Set_Property(@Window:'.EDL_DESCRIPTION', 'TEXT', NotifyRec<NOTIFICATION_DESC$>)
UseAD = NotifyRec<NOTIFICATION_USE_ACTIVE_DIRECTORY$>
Set_Property(@Window:'.CHK_USE_AD', 'DEFPROP', UseAD)
LimitOnShift = NotifyRec<NOTIFICATION_LIMIT_TO_ACTIVE_SHIFT$>
Set_Property(@Window:'.CHK_LIMIT_TO_ACTIVE_SHIFT', 'DEFPROP', LimitOnShift)
LSLUsers = NotifyRec<NOTIFICATION_USER_ID$>
LSLUsernames = Xlate('LSL_USERS', LSLUsers, 'FIRST_LAST', 'X')
LSLUsersArray = LSLUsers : @FM : LSLUsernames
Set_Property(@Window:'.EDT_LSL_USERS', 'ARRAY', LSLUsersArray)
ADGroups = NotifyRec<NOTIFICATION_ACTIVE_DIRECTORY_GROUPS$>
GroupList = ''
If ADGroups NE '' then
For each ADGroup in ADGroups using @VM setting vPos
GroupList<-1> = Active_Directory_Services('GetADGroupsByString', ADGroup, 'INFINEON')
Next ADGroup
end
Set_Property(@Window:'.EDT_AD_GROUPS', 'LIST', GroupList)
GoSub EnableControls
end else
Msg(@Window, '', 'OK', '', 'Error':@FM:'Error locking NOTIFICATION record "':Key:'" for update!')
end
Set_Property(@Window:'.EDT_AD_GROUPS', 'LIST', GroupList)
GoSub EnableControls
end else
Msg(@Window, '', 'OK', '', 'Error':@FM:'Error locking NOTIFICATION record "':Key:'" for update!')
Msg(@Window, '', 'OK', '', 'Error':@FM:'Error reading NOTIFICATION record "':Key:'"!')
end
end else
Msg(@Window, '', 'OK', '', 'Error':@FM:'Error reading NOTIFICATION record "':Key:'"!')
end
Case Otherwise$
// User is creating a new record
Set_Property(@Window:'.PUB_ADD_USERS', 'ENABLED', True$)
GoSub EnableControls
End Case
Case NewRec
Null
Case Otherwise$
// User is creating a new record
Set_Property(@Window, 'REDRAW', False$)
Send_Event(@Window, 'CLEAR')
Set_Property(@Window:'.EDL_NOTIFICATION_ID', 'TEXT', Key)
Set_Property(@Window, '@LOCK_KEY', Key)
Set_Property(@Window, '@NEW_REC', True$)
GoSub EnableControls
Set_Property(@Window:'.PUB_LU_ID', 'FOCUS', True$)
Set_Property(@Window, 'REDRAW', True$)
End Case
end
end event
Event WINDOW.CLEAR(bSaveKey, bSuppressWarning, bMaintainFocus)
GoSub EnableControls
Set_Property(@Window:'.PUB_DELETE', 'ENABLED', False$)
Set_Property(@Window:'.PUB_CLEAR', 'ENABLED', True$)
Set_Property(@Window:'.EDL_DESCRIPTION', 'ENABLED', False$)
Set_Property(@Window:'.CHK_USE_AD', 'ENABLED', False$)
Set_Property(@Window:'.CHK_LIMIT_TO_ACTIVE_SHIFT', 'ENABLED', False$)
EventFlow = EVENT_CONTINUE$
OrigRec = Get_Property(@Window, '@RECORD')
EditRec = Get_Property(@Window, '@EDIT_RECORD')
Set_Property(@Window:'.PUB_ADD_USERS', 'ENABLED', False$)
Set_Property(@Window:'.REM_ADD_USERS', 'ENABLED', False$)
If OrigRec NE EditRec then
Response = Msg(@Window, '', 'YES_NO_CANCEL', '', 'OpenInsight':@FM:'Would you like to save changes to the entry?')
Begin Case
Case Response EQ 1
// Yes - Save changed and close form
Send_Event(@Window, 'WRITE')
Case Response EQ 0
// No - Abandon changes and clear form
Null
Case Otherwise$
// Cancel - Stop Clear Event
EventFlow = EVENT_STOP$
End Case
end
Set_Property(@Window:'.GRB_AD_GROUPS', 'ENABLED', False$)
Set_Property(@Window:'.EDT_AD_GROUPS', 'ENABLED', False$)
Set_Property(@Window:'.PUB_ADD_GROUPS', 'ENABLED', False$)
Set_Property(@Window:'.REM_ADD_GROUPS', 'ENABLED', False$)
If EventFlow EQ EVENT_CONTINUE$ then
Set_Property(@Window, '@NEW_REC', False$)
GoSub UnlockRec
Forward_Event()
Set_Property(@Window, '@RECORD', '')
Set_Property(@Window, '@EDIT_RECORD', '')
GoSub EnableControls
Set_Property(@Window:'.PUB_DELETE' , 'ENABLED', False$)
Set_Property(@Window:'.PUB_CLEAR' , 'ENABLED', True$)
Set_Property(@Window:'.EDL_DESCRIPTION' , 'ENABLED', False$)
Set_Property(@Window:'.CHK_USE_AD' , 'ENABLED', False$)
Set_Property(@Window:'.CHK_LIMIT_TO_ACTIVE_SHIFT', 'ENABLED', False$)
Set_Property(@Window:'.PUB_ADD_USERS' , 'ENABLED', False$)
Set_Property(@Window:'.REM_ADD_USERS' , 'ENABLED', False$)
Set_Property(@Window:'.GRB_AD_GROUPS' , 'ENABLED', False$)
Set_Property(@Window:'.EDT_AD_GROUPS' , 'ENABLED', False$)
Set_Property(@Window:'.PUB_ADD_GROUPS' , 'ENABLED', False$)
Set_Property(@Window:'.REM_ADD_GROUPS' , 'ENABLED', False$)
end
end event
Event WINDOW.WRITE()
Key = Get_Property(@Window:'.EDL_NOTIFICATION_ID', 'TEXT')
Key = Get_Property(@Window, '@LOCK_KEY')
NotifyRec = Get_Property(@Window, '@RECORD')
NotifyRec<NOTIFICATION_DESC$> = Get_Property(@Window:'.EDL_DESCRIPTION', 'TEXT')
UserArray = Get_Property(@Window:'.EDT_LSL_USERS', 'ARRAY')
@ -159,7 +234,9 @@ Event WINDOW.WRITE()
Database_Services('WriteDataRow', 'NOTIFICATION', Key, NotifyRec, True$, False$, True$)
If Error_Services('NoError') then
GoSub UnlockRec
Post_Event(@Window, 'CLEAR')
Set_Property(@Window, '@RECORD', GroupRec)
Set_Property(@Window, '@EDIT_RECORD', GroupRec)
Send_Event(@Window, 'CLEAR')
end else
Msg(@Window, '', 'OK', '', 'Error':@FM:Error_Services('GetMessage'))
end
@ -169,7 +246,25 @@ end event
Event WINDOW.CLOSE(CancelFlag, CloseFlags)
GoSub UnlockRec
EventFlow = EVENT_CONTINUE$
OrigRec = Get_Property(@Window, '@RECORD')
EditRec = Get_Property(@Window, '@EDIT_RECORD')
If OrigRec NE EditRec then
Response = Msg(@Window, '', 'YES_NO_CANCEL', '', 'OpenInsight':@FM:'Would you like to save changes to the entry?')
Begin Case
Case Response EQ 1
// Yes - Save changed and close form
Send_Event(@Window, 'WRITE')
Case Response EQ 0
// No - Abandon changes and close form
Null
Case Otherwise$
// Cancel - Stop Close Event
EventFlow = EVENT_STOP$
End Case
end
If EventFlow EQ EVENT_CONTINUE$ then GoSub UnlockRec
end event
@ -191,11 +286,73 @@ end event
Event PUB_LU_ID.CLICK()
TypeOver = ''
TypeOver<PSELECT$> = 1
NotifyID = Popup(@WINDOW,TypeOver,'NOTIFICATION')
IF NotifyID NE '' THEN
Set_Property(@Window:'.EDL_NOTIFICATION_ID', 'TEXT', NotifyID)
EventFlow = EVENT_CONTINUE$
OrigRec = Get_Property(@Window, '@RECORD')
EditRec = Get_Property(@Window, '@EDIT_RECORD')
If OrigRec NE EditRec then
Response = Msg(@Window, '', 'YES_NO_CANCEL', '', 'OpenInsight':@FM:'Would you like to save changes to the entry?')
Begin Case
Case Response EQ Yes$
// Save changes and read new record
Send_Event(@Window, 'WRITE')
Case Response EQ No$
// Abandon changes and read new form
Null
Case Otherwise$
// Cancel - Stop Read Event
EventFlow = EVENT_STOP$
End Case
end
If EventFlow EQ EVENT_CONTINUE$ then
TypeOver = ''
TypeOver<PSELECT$> = 1
NotifyID = Popup(@WINDOW,TypeOver,'NOTIFICATION')
If NotifyID NE '' then
Set_Property(@Window, '@RECORD', '')
Set_Property(@Window, '@EDIT_RECORD', '')
Set_Property(@Window:'.EDL_NOTIFICATION_ID', 'TEXT', NotifyID)
Post_Event(@Window, 'READ')
end
end
end event
Event EDL_NOTIFICATION_ID.OPTIONS()
EventFlow = EVENT_CONTINUE$
OrigRec = Get_Property(@Window, '@RECORD')
EditRec = Get_Property(@Window, '@EDIT_RECORD')
If OrigRec NE EditRec then
Response = Msg(@Window, '', 'YES_NO_CANCEL', '', 'OpenInsight':@FM:'Would you like to save changes to the entry?')
Begin Case
Case Response EQ Yes$
// Save changes and read new record
Send_Event(@Window, 'WRITE')
Case Response EQ No$
// Abandon changes and read new form
Null
Case Otherwise$
// Cancel - Stop Read Event
EventFlow = EVENT_STOP$
End Case
end
If EventFlow EQ EVENT_CONTINUE$ then
TypeOver = ''
TypeOver<PSELECT$> = 1
NotifyID = Popup(@WINDOW,TypeOver,'NOTIFICATION')
IF NotifyID NE '' THEN
Set_Property(@Window, '@RECORD', '')
Set_Property(@Window, '@EDIT_RECORD', '')
Set_Property(CtrlEntId, 'TEXT', NotifyID)
Post_Event(@Window, 'READ')
end
end
end event
@ -215,16 +372,6 @@ Event EDT_AD_GROUPS.ROWSELCHANGED(SelRow, SelState)
end event
Event EDL_NOTIFICATION_ID.CHANGED(NewData)
If NewData NE '' then
GoSub UnlockRec
Post_Event(@Window, 'READ')
end
end event
Event EDL_NOTIFICATION_ID.LOSTFOCUS(Flag, FocusID)
If Flag EQ 1 then
@ -248,19 +395,20 @@ Event PUB_ADD_USERS.CLICK()
NewUserIDs = Popup(@WINDOW,'','SHOW_USERS')
IF NewUserIDs = '' OR NewUserIDs = CHAR(27) THEN RETURN
If ( (NewUserIDs NE '') and (NewUserIDs NE CHAR(27)) ) then
FOR I = 1 TO COUNT(NewUserIDs,@VM) + (NewUserIDs NE '')
NewUserID = NewUserIDs<1,I>
LOCATE NewUserID IN CurrUserIDs BY 'AL' USING @VM SETTING POS ELSE
CurrUserIDs = INSERT(CurrUserIDs,1,POS,0,NewUserID)
END
For I = 1 TO COUNT(NewUserIDs,@VM) + (NewUserIDs NE '')
NewUserID = NewUserIDs<1,I>
Locate NewUserID in CurrUserIDs by 'AL' using @VM setting POS else
CurrUserIDs = INSERT(CurrUserIDs,1,POS,0,NewUserID)
end
Next I
NEXT I
LSLNames = Xlate('LSL_USERS', CurrUserIDs, 'FIRST_LAST', 'X')
NewArray = CurrUserIDs : @FM : LSLNames
Set_Property(@Window:'.EDT_LSL_USERS', 'ARRAY', NewArray)
LSLNames = Xlate('LSL_USERS', CurrUserIDs, 'FIRST_LAST', 'X')
NewArray = CurrUserIDs : @FM : LSLNames
Set_Property(@Window:'.EDT_LSL_USERS', 'ARRAY', NewArray)
Post_Event(@Window:'.EDT_LSL_USERS', 'CHANGED')
end
end event
@ -278,6 +426,7 @@ Event PUB_REM_USERS.CLICK()
Next Row
Set_Property(@Window:'.EDT_LSL_USERS', 'LIST', NewList)
GoSub EnableControls
Post_Event(@Window:'.EDT_LSL_USERS', 'CHANGED')
end
end event
@ -287,7 +436,7 @@ Event PUB_ADD_GROUPS.CLICK()
GroupArray = Get_Property(@Window:'.EDT_AD_GROUPS', 'ARRAY')
GroupIds = GroupArray<1>
SelGroups = Dialog_Box('NDW_ACTIVE_DIRECTORY_GROUPS', @Window, GroupIds)
SelGroups = Dialog_Box('NDW_ACTIVE_DIRECTORY_GROUPS', @Window, GroupIds:@RM:'DL')
If SelGroups NE '' then
Set_Property(@Window:'.EDT_AD_GROUPS', 'LIST', SelGroups)
@ -320,13 +469,16 @@ Event PUB_ADD_GROUPS.CLICK()
end
Next GroupId
If LSLUsernames NE '' then
LSLNames = Xlate('LSL_USERS', LSLUserNames, 'FIRST_LAST', 'X')
LSLUsernames = SRP_Array('Clean', LSLUsernames, 'TrimAndMakeUnique', @VM)
LSLUsernames = SRP_Array('SortSimpleList', LSLUsernames, 'AscendingText', @VM)
LSLNames = Xlate('LSL_USERS', LSLUsernames, 'FIRST_LAST', 'X')
end
end
Array = LSLUsernames : @FM : LSLNames
Set_Property(@Window:'.EDT_LSL_USERS', 'ARRAY', Array)
Msg(@window, MsgUp) ;* take down the processing message
Post_Event(@Window:'.EDT_AD_GROUPS', 'CHANGED')
end
end event
@ -345,6 +497,7 @@ Event PUB_REM_GROUPS.CLICK()
Next Row
Set_Property(@Window:'.EDT_AD_GROUPS', 'LIST', NewList)
GoSub EnableControls
Post_Event(@Window:'.EDT_AD_GROUPS', 'CHANGED')
end
end event
@ -352,25 +505,76 @@ end event
Event CHK_USE_AD.CLICK()
EditRecord = Get_Property(@Window, '@EDIT_RECORD')
UseAD = Get_Property(CtrlEntId, 'CHECK')
EditRecord<NOTIFICATION_USE_ACTIVE_DIRECTORY$> = UseAD
Set_Property(@Window, '@EDIT_RECORD', EditRecord)
GoSub EnableControls
end event
Event CHK_LIMIT_TO_ACTIVE_SHIFT.CLICK()
EditRecord = Get_Property(@Window, '@EDIT_RECORD')
UseAD = Get_Property(CtrlEntId, 'CHECK')
EditRecord<NOTIFICATION_LIMIT_TO_ACTIVE_SHIFT$> = UseAD
Set_Property(@Window, '@EDIT_RECORD', EditRecord)
end event
Event EDT_AD_GROUPS.CHANGED(NewData)
EditRecord = Get_Property(@Window, '@EDIT_RECORD')
ADGroupsArray = Get_Property(CtrlEntId, 'ARRAY')
GroupNames = ADGroupsArray<1>
EditRecord<NOTIFICATION_ACTIVE_DIRECTORY_GROUPS$> = GroupNames
Set_Property(@Window, '@EDIT_RECORD', EditRecord)
end event
Event EDT_LSL_USERS.CHANGED(NewData)
EditRecord = Get_Property(@Window, '@EDIT_RECORD')
LSLUsersArray = Get_Property(CtrlEntId, 'ARRAY')
LSLUsernames = LSLUsersArray<1>
EditRecord<NOTIFICATION_USER_ID$> = LSLUsernames
Set_Property(@Window, '@EDIT_RECORD', EditRecord)
end event
Event EDL_DESCRIPTION.CHANGED(NewData)
EditRecord = Get_Property(@Window, '@EDIT_RECORD')
EditRecord<NOTIFICATION_DESC$> = NewData
Set_Property(@Window, '@EDIT_RECORD', EditRecord)
end event
//-----------------------------------------------------------------------------
// Internal GoSubs
//-----------------------------------------------------------------------------
EnableControls:
NotifyID = Get_Property(@Window:'.EDL_NOTIFICATION_ID', 'TEXT')
UseAD = Get_Property(@Window:'.CHK_USE_AD', 'DEFPROP')
Enabled = (NotifyID NE '')
Set_Property(@Window:'.PUB_CLEAR', 'ENABLED', (NotifyID NE ''))
Set_Property(@Window:'.EDL_DESCRIPTION', 'ENABLED', (NotifyID NE ''))
Set_Property(@Window:'.CHK_USE_AD', 'ENABLED', (NotifyID NE ''))
Set_Property(@Window:'.PUB_CLEAR' , 'ENABLED', Enabled)
Set_Property(@Window:'.EDL_DESCRIPTION', 'ENABLED', Enabled)
Set_Property(@Window:'.CHK_USE_AD' , 'ENABLED', Enabled)
If UseAD NE True$ then Set_Property(@Window:'.CHK_LIMIT_TO_ACTIVE_SHIFT', 'DEFPROP', False$)
Set_Property(@Window:'.CHK_LIMIT_TO_ACTIVE_SHIFT', 'ENABLED', UseAD)
Set_Property(@Window:'.PUB_ADD_USERS', 'ENABLED', (UseAD NE True$))
Set_Property(@Window:'.EDT_LSL_USERS', 'ENABLED', (NotifyID NE ''))
Set_Property(@Window:'.EDT_LSL_USERS', 'ENABLED', Enabled)
If NotifyID NE '' then
Backcolor = WHITE$
@ -378,13 +582,12 @@ EnableControls:
Backcolor = GREY$
end
Set_Property(@Window:'.EDT_LSL_USERS', 'BACKCOLOR', Backcolor)
Set_Property(@Window:'.GRB_AD_GROUPS', 'ENABLED', (UseAD EQ True$))
Set_Property(@Window:'.EDT_LSL_USERS' , 'BACKCOLOR', Backcolor)
Set_Property(@Window:'.GRB_AD_GROUPS' , 'ENABLED', (UseAD EQ True$))
Set_Property(@Window:'.PUB_ADD_GROUPS', 'ENABLED', (UseAD EQ True$))
Set_Property(@Window:'.EDT_AD_GROUPS', 'ENABLED', (UseAD EQ True$))
Set_Property(@Window:'.EDT_AD_GROUPS' , 'ENABLED', (UseAD EQ True$))
If ( (NotifyID NE '') and (UseAD EQ True$) ) then
If ( Enabled and (UseAD EQ True$) ) then
Backcolor = WHITE$
end else
Backcolor = GREY$
@ -438,4 +641,3 @@ UnlockRec:
return