user 계정 권한 입력 - 오프라인으로 BOTH 로 적용

This commit is contained in:
chi
2020-01-09 00:07:35 +09:00
parent a444193a53
commit db5c273a18
11 changed files with 62 additions and 40 deletions

View File

@@ -92,10 +92,10 @@
UseriNfo = New ArinLogin.ArinLOgin.User_Info()
UseriNfo.authtype = "IP"
UseriNfo.name = tb_id.Text
'ElseIf tb_id.Text.StartsWith("user") Then
' UseriNfo = New ArinLogin.ArinLOgin.User_Info()
' UseriNfo.authtype = "IP"
' UseriNfo.name = tb_id.Text
ElseIf tb_id.Text.StartsWith("user") Then
UseriNfo = New ArinLogin.ArinLOgin.User_Info()
UseriNfo.authtype = "IP"
UseriNfo.name = tb_id.Text
Else
Work_msg("서버 응답을 기다리는중")
Dim L As New ArinLogin.ArinLOgin
@@ -110,7 +110,7 @@
Select Case UseriNfo.authtype
Case "IP"
If Me.tb_id.Text.ToLower() <> "guest" Then 'AndAlso Not Me.tb_id.Text.ToLower().StartsWith("user") Then
If Me.tb_id.Text.ToLower() <> "guest" AndAlso Not Me.tb_id.Text.ToLower().StartsWith("user") Then
If Prj.CUrIP.ToUpper <> UseriNfo.authip.ToUpper Then
MsgBox("로그인사용자와 현재컴퓨터의 IP가 일치하지않습니다", MsgBoxStyle.Critical, "확인")
Return
@@ -120,17 +120,24 @@
Dim userPass As String
Dim userMAC As String
Dim userIP As String
userMAC = Prj.CUrMac.GetHashCode
If Me.tb_id.Text.ToLower().StartsWith("user") Then
userMAC = ("USER" & Prj.CUrMac.Substring(4)).GetHashCode
Else
userMAC = Prj.CUrMac.GetHashCode
End If
userIP = Prj.CUrIP.GetHashCode
userPass = userIP + userMAC
userPass = userPass.GetHashCode
If CLng(userPass) < 0 Then
userPass = (CLng(userPass) * -1).ToString
End If
'If Me.tb_pw.Text <> userPass Then
' MsgBox("존재하지 않는계정이거나 비밀번호오류입니다", MsgBoxStyle.Critical, "확인")
' End
'End If
If tb_id.Text.ToLower().StartsWith("user") AndAlso Me.tb_pw.Text <> userPass Then
MsgBox("존재하지 않는계정이거나 비밀번호오류입니다", MsgBoxStyle.Critical, "확인")
End
End If
Catch ex As Exception
MsgBox("존재하지 않는계정이거나 비밀번호오류입니다", MsgBoxStyle.Critical, "확인")
End
@@ -161,8 +168,8 @@
Prj.UserPass = Me.tb_pw.Text
If Me.tb_id.Text.ToLower() = "guest" Then
Prj.UserAuthType = "BOTH0"
'ElseIf Me.tb_id.Text.ToLower().StartsWith("user") Then
' Prj.UserAuthType = "BOTH"
ElseIf Me.tb_id.Text.ToLower().StartsWith("user") Then
Prj.UserAuthType = "BOTH"
Else
Prj.UserAuthType = UseriNfo.authtype
End If