Implemented ReceiveRelease_API.
Added OI Wizard Webview form to launch into OI Wizard from OI and auto-login the user. Added menu items to NDW_MAIN to launch the OI Wizard webview form and navigated to the appropriate page.
This commit is contained in:
@ -27,17 +27,22 @@ $Insert SERVICE_SETUP
|
||||
$Insert APP_INSERTS
|
||||
$Insert REVDOTNETEQUATES
|
||||
|
||||
Declare function Logging_Services, Environment_Services, Active_Directory_Services
|
||||
Declare subroutine Set_Property.Net, Logging_Services, Set_Status, Database_Services
|
||||
Declare function Logging_Services, Environment_Services, Active_Directory_Services, Database_Services
|
||||
Declare function Error_Services, SRP_Array
|
||||
Declare subroutine Set_Property.Net, Logging_Services, Set_Status, Database_Services, Error_Services
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\ActiveDirectory'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' ActiveDirectoryAuthLog.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'Username' : @FM : 'Authenticated'
|
||||
objADAuthLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$)
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' ActiveDirectoryAuthenticationLog.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'Username' : @FM : 'Authenticated'
|
||||
objADAuthenticationLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$)
|
||||
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' ActiveDirectoryAuthorizationLog.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'Username' : @FM : 'Authorized'
|
||||
objADAuthorizationLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$)
|
||||
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' ActiveDirectoryLog.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'Operation' : @FM : 'Message'
|
||||
@ -83,12 +88,43 @@ Service AuthenticateUser(Username, Password, Domain)
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = Username
|
||||
LogData<3> = Authenticated
|
||||
Logging_Services('AppendLog', objADAuthLog, LogData, @RM, @FM, False$)
|
||||
Logging_Services('AppendLog', objADAuthenticationLog, LogData, @RM, @FM, False$)
|
||||
Response = Authenticated
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service AuthorizeUser(Username, Domain)
|
||||
|
||||
ErrorMsg = ''
|
||||
Authorized = False$
|
||||
If ( (Username NE '') and (Domain NE '') ) then
|
||||
AuthAdGroups = ''
|
||||
LoginConfig = Database_Services('ReadDataRow', 'SYSENV', 'CFG_LOGIN*LSL2')
|
||||
If Error_Services('NoError') then
|
||||
AuthAdGroups<-1> = LoginConfig<2>
|
||||
AuthAdGroups<-1> = LoginConfig<3>
|
||||
AuthAdGroups<-1> = LoginConfig<4>
|
||||
UserAdGroups = Active_Directory_Services('GetADGroups', Username, Domain)
|
||||
MemberOfAuthGroups = SRP_Array('Join', UserAdGroups, AuthAdGroups, 'AND', @FM)
|
||||
Authorized = (MemberOfAuthGroups NE '')
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error retrieving active directory authorization groups.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Username and domain required.'
|
||||
end
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = Username
|
||||
LogData<3> = Authorized
|
||||
Logging_Services('AppendLog', objADAuthorizationLog, LogData, @RM, @FM, False$)
|
||||
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||
Response = Authorized
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetADGroups(Username, Domain)
|
||||
|
||||
ADGroups = ''
|
||||
@ -143,7 +179,6 @@ Service GetADGroups(Username, Domain)
|
||||
End Service
|
||||
|
||||
|
||||
|
||||
Service GetComputerDomain()
|
||||
|
||||
Domain = ''
|
||||
@ -166,6 +201,7 @@ Service GetComputerDomain()
|
||||
|
||||
end service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// GetADGroupsByString
|
||||
//
|
||||
@ -303,8 +339,10 @@ Service GetADGroupsByString(SearchString, Domain=DOMAIN, SearchByDescription=DES
|
||||
end
|
||||
|
||||
Response = ADGroups
|
||||
|
||||
end service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// GetADGroupMembersByGroupDescription
|
||||
//
|
||||
@ -319,6 +357,7 @@ end service
|
||||
// 9/26/2024 - [JRO] Initial Programmer.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetADGroupMembersByGroupDescription(DescriptionName, Domain=DOMAIN)
|
||||
|
||||
Set_Status(0)
|
||||
ErrMessage = ''
|
||||
GroupUsers = ''
|
||||
@ -397,8 +436,10 @@ Service GetADGroupMembersByGroupDescription(DescriptionName, Domain=DOMAIN)
|
||||
Error_Services('Add', ErrMessage)
|
||||
end
|
||||
Response = GroupUsers
|
||||
|
||||
end service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// GetADGroupMembersByGroupName
|
||||
//
|
||||
@ -413,6 +454,7 @@ end service
|
||||
// 9/26/2024 - [JRO] Initial Programmer.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetADGroupMembersByGroupName(GroupName, Domain=DOMAIN)
|
||||
|
||||
Set_Status(0)
|
||||
Users = ''
|
||||
ErrMessage = ''
|
||||
@ -501,8 +543,10 @@ Service GetADGroupMembersByGroupName(GroupName, Domain=DOMAIN)
|
||||
Error_Services('Add', ErrMessage)
|
||||
end
|
||||
Response = Users
|
||||
|
||||
end service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// GetADUserAttributes
|
||||
//
|
||||
@ -513,6 +557,7 @@ end service
|
||||
// First value is the AD User Name, Second value is the Display Name, and third value is the email.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetADUserAttributes(Username, Domain=DOMAIN)
|
||||
|
||||
Set_Status(0)
|
||||
ThisUser = ''
|
||||
ErrMessage = ''
|
||||
@ -593,5 +638,6 @@ Service GetADUserAttributes(Username, Domain=DOMAIN)
|
||||
Error_Services('Add', ErrMessage)
|
||||
end
|
||||
Response = ThisUser
|
||||
|
||||
end service
|
||||
|
||||
|
Reference in New Issue
Block a user