From 2f22a15fd27bf9ead8ddc1d67e1a0ef4f0ba9bf5 Mon Sep 17 00:00:00 2001 From: chi Date: Tue, 21 Nov 2023 20:18:38 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90=EB=8A=94=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=20=EA=B3=84=EC=A0=95=20=EC=95=94?= =?UTF-8?q?=ED=98=B8=20=EB=B3=80=EA=B2=BD=EC=8B=9C=20oldpassword=20?= =?UTF-8?q?=EB=A5=BC=20=EB=AC=BB=EC=A7=80=20=EC=95=8A=EC=8A=B5=EB=8B=88?= =?UTF-8?q?=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project/Properties/AssemblyInfo.cs | 4 +- Project/_Common/fAddNewUser.cs | 20 +++++++-- Project/_Common/fNewPassword.cs | 9 +++- Project/_Common/fUserList.Designer.cs | 64 ++++++++++++++++----------- Project/_Common/fUserList.resx | 13 +++--- 5 files changed, 71 insertions(+), 39 deletions(-) diff --git a/Project/Properties/AssemblyInfo.cs b/Project/Properties/AssemblyInfo.cs index abeacca..f90a216 100644 --- a/Project/Properties/AssemblyInfo.cs +++ b/Project/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 // 지정되도록 할 수 있습니다. // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("23.11.20.0830")] -[assembly: AssemblyFileVersion("23.11.20.0830")] +[assembly: AssemblyVersion("23.11.21.2000")] +[assembly: AssemblyFileVersion("23.11.21.2000")] diff --git a/Project/_Common/fAddNewUser.cs b/Project/_Common/fAddNewUser.cs index cde4420..06a9816 100644 --- a/Project/_Common/fAddNewUser.cs +++ b/Project/_Common/fAddNewUser.cs @@ -172,9 +172,19 @@ namespace Project._Common } if (drGuser.level == 0) { - FCOMMON.Util.MsgE($"이미 존재하는 사용자 정보입니다\n"+ - "아직 관리자 승인이 되지 않은 상태입니다\n"+ - "계정관리자 통해서 계정을 활성화를 하세요"); + int curLevel = Math.Max(FCOMMON.info.Login.level, FCOMMON.DBM.getAuth(FCOMMON.DBM.eAuthType.account)); + if(curLevel >= 5) + { + FCOMMON.Util.MsgI($"해당 계정이 활성화 됩니다."); + drGuser.level = 1; + } + else { + FCOMMON.Util.MsgE($"이미 존재하는 사용자 정보입니다\n" + + "아직 관리자 승인이 되지 않은 상태입니다\n" + + "계정관리자 통해서 계정을 활성화를 하세요"); + } + + } else FCOMMON.Util.MsgI($"이미 존재하는 사용자 정보입니다\n" + "기존 정보가 업데이트 됩니다"); } @@ -291,6 +301,8 @@ namespace Project._Common var f = new fNewPassword(this.tbId.Text); if (f.ShowDialog() == DialogResult.OK) { + int curLevel = Math.Max(FCOMMON.info.Login.level, FCOMMON.DBM.getAuth(FCOMMON.DBM.eAuthType.account)); + var opass = Pub.MakePasswordEnc(f.tbPassO.Text); //해당 그룹에 해당 사용자가 존재하는지 확이한다. @@ -300,7 +312,7 @@ namespace Project._Common var drUser = db.Users.SingleOrDefault(t => t.id == uid); if (drUser != null) { - if (opass.Equals(drUser.password) == false) + if (curLevel < 5 && opass.Equals(drUser.password) == false) { Util.MsgE("기존 암호가 일치하지 않습니다"); return; diff --git a/Project/_Common/fNewPassword.cs b/Project/_Common/fNewPassword.cs index 4ab034d..43596a5 100644 --- a/Project/_Common/fNewPassword.cs +++ b/Project/_Common/fNewPassword.cs @@ -20,12 +20,19 @@ namespace Project._Common private void fNewPassword_Load(object sender, EventArgs e) { + //일반사용자의경우에는 상태를 변경하지 못한다. + int curLevel = Math.Max(FCOMMON.info.Login.level, FCOMMON.DBM.getAuth(FCOMMON.DBM.eAuthType.account)); + if (curLevel >= 5) + tbPassO.Enabled = false; + else + tbPassO.Enabled = true; + newpassword = string.Empty; } private void button1_Click(object sender, EventArgs e) { - if(tbPassO.Text.isEmpty()) + if(tbPassO.Enabled && tbPassO.Text.isEmpty()) { Util.MsgE("OLd Password Error"); tbPassO.Focus(); diff --git a/Project/_Common/fUserList.Designer.cs b/Project/_Common/fUserList.Designer.cs index 552a560..4223417 100644 --- a/Project/_Common/fUserList.Designer.cs +++ b/Project/_Common/fUserList.Designer.cs @@ -65,6 +65,8 @@ this.tbFind = new System.Windows.Forms.TextBox(); this.ta = new Project.dsMSSQLTableAdapters.vGroupUserTableAdapter(); this.arDatagridView1 = new arCtl.arDatagridView(); + this.panel1 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); this.idDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.nameE = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -77,11 +79,10 @@ this.processsDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.stateDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.memoDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.level = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.useUserStateDataGridViewCheckBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.useJobReportDataGridViewCheckBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.exceptHolyDataGridViewCheckBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.panel1 = new System.Windows.Forms.Panel(); - this.label1 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit(); this.bn.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); @@ -405,6 +406,7 @@ this.processsDataGridViewTextBoxColumn, this.stateDataGridViewTextBoxColumn, this.memoDataGridViewTextBoxColumn, + this.level, this.useUserStateDataGridViewCheckBoxColumn, this.useJobReportDataGridViewCheckBoxColumn, this.exceptHolyDataGridViewCheckBoxColumn}); @@ -418,6 +420,28 @@ this.arDatagridView1.Size = new System.Drawing.Size(1234, 603); this.arDatagridView1.TabIndex = 6; // + // panel1 + // + this.panel1.Controls.Add(this.tbFind); + this.panel1.Controls.Add(this.label1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panel1.Location = new System.Drawing.Point(0, 628); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(1234, 44); + this.panel1.TabIndex = 7; + // + // label1 + // + this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.label1.Dock = System.Windows.Forms.DockStyle.Left; + this.label1.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label1.Location = new System.Drawing.Point(0, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(126, 44); + this.label1.TabIndex = 4; + this.label1.Text = "검색"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // // idDataGridViewTextBoxColumn // this.idDataGridViewTextBoxColumn.DataPropertyName = "id"; @@ -502,10 +526,17 @@ this.memoDataGridViewTextBoxColumn.Name = "memoDataGridViewTextBoxColumn"; this.memoDataGridViewTextBoxColumn.ReadOnly = true; // + // level + // + this.level.DataPropertyName = "level"; + this.level.HeaderText = "Lv"; + this.level.Name = "level"; + this.level.ReadOnly = true; + // // useUserStateDataGridViewCheckBoxColumn // this.useUserStateDataGridViewCheckBoxColumn.DataPropertyName = "useUserState"; - this.useUserStateDataGridViewCheckBoxColumn.HeaderText = "게정사용"; + this.useUserStateDataGridViewCheckBoxColumn.HeaderText = "계정사용"; this.useUserStateDataGridViewCheckBoxColumn.Name = "useUserStateDataGridViewCheckBoxColumn"; this.useUserStateDataGridViewCheckBoxColumn.ReadOnly = true; // @@ -523,28 +554,6 @@ this.exceptHolyDataGridViewCheckBoxColumn.Name = "exceptHolyDataGridViewCheckBoxColumn"; this.exceptHolyDataGridViewCheckBoxColumn.ReadOnly = true; // - // panel1 - // - this.panel1.Controls.Add(this.tbFind); - this.panel1.Controls.Add(this.label1); - this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panel1.Location = new System.Drawing.Point(0, 628); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(1234, 44); - this.panel1.TabIndex = 7; - // - // label1 - // - this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); - this.label1.Dock = System.Windows.Forms.DockStyle.Left; - this.label1.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - this.label1.Location = new System.Drawing.Point(0, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(126, 44); - this.label1.TabIndex = 4; - this.label1.Text = "검색"; - this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // // fUserList // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); @@ -610,6 +619,8 @@ private System.Windows.Forms.ToolStripButton btSave; private System.Windows.Forms.ToolStripButton btDel; private arCtl.arDatagridView arDatagridView1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label label1; private System.Windows.Forms.DataGridViewTextBoxColumn idDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewTextBoxColumn nameDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewTextBoxColumn nameE; @@ -622,10 +633,9 @@ private System.Windows.Forms.DataGridViewTextBoxColumn processsDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewTextBoxColumn stateDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewTextBoxColumn memoDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn level; private System.Windows.Forms.DataGridViewCheckBoxColumn useUserStateDataGridViewCheckBoxColumn; private System.Windows.Forms.DataGridViewCheckBoxColumn useJobReportDataGridViewCheckBoxColumn; private System.Windows.Forms.DataGridViewCheckBoxColumn exceptHolyDataGridViewCheckBoxColumn; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Label label1; } } \ No newline at end of file diff --git a/Project/_Common/fUserList.resx b/Project/_Common/fUserList.resx index 9a92ff4..eab7602 100644 --- a/Project/_Common/fUserList.resx +++ b/Project/_Common/fUserList.resx @@ -130,7 +130,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wQAADsEBuJFr7QAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77 + wAAADsABataJCQAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77 wf/ghmu4DciY8vT/wn0fsCqK73n4f+n+///9qy/gNiCh58n/aVveYyiKaL8P1pw56/9/r9ITuA2I7Hr0 v3f1BxRFoa33wJpb1wFt7/z73yX/AG4DApsf/q+b/w6uKLjl7v9Fe///7wBqzpjz879d3c//9hnbcRvg UXX/f/60NyiK7Ipv/0+f8/u/f9e3/zqF7/5bJKzHbYB96d3/2ZNfYyjSTzn/36ToxX+VrE//jSOX4TbA @@ -141,7 +141,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wQAADsEBuJFr7QAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w + wAAADsABataJCQAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w 5sxZ//97lZ4gzYDQ1ntgza3rgLZ3/v3vkn+AeAOCW+7+X7T3//8OoOaMOT//29X9/G+fsZ00F9gV3/6f Puf3f/+ub/91Ct/9t0hYT3oY6Kec/29S9OK/Stan/8aRy0g3AAQMkk78l037+l83eB55BoCAfurl/xq+ 08g3AARUPCZQZsBgBQwMANAUYJgEulBVAAAAAElFTkSuQmCC @@ -150,7 +150,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wQAADsEBuJFr7QAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78 + wAAADsABataJCQAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78 n73v1//OrX//u5VeJt2QyK5H/6ds+/W/ZOnf/wnT//63yT1LmiGBzQ//t659D9ZsXPLlv3T0tf/GkcuI N8Sj6v7/krnv4JoVXXpIc4F96d3/gS3PyNMMAhZ5d/7bFFwhTzMIGGbdJl8zCOik3SBf81AEDAwAoH5f oAc0QjgAAAAASUVORK5CYII= @@ -159,7 +159,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wQAADsEBuJFr7QAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+// + wAAADsABataJCQAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+// h7c/wG1AxpSn/+ft//0/oesOhiKQ3MJ9H/4HN1zDbUBCz5P/s/f9+t+59e9/t9LLKApBctO2vP/vX30B twGRXY/+T9n263/J0r//E6b//W+TexauGCTXu/rDf6/SE7gNCGx++L917XuwZuOSL/+lo6/9N45cBtYA kqub/+6/S/4B3AZ4VN3/XzL3HVyzoksPXDFILn/am//2GdtxG2Bfevd/YMszDM0gAJLLnvz6v0XCetwG @@ -170,7 +170,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wQAADsEBuJFr7QAAAUpJREFUOE9jGLzg7gL2/7fmcf6/Oofr/8UZvP+hwsSD60CNfx41/v/zsOH/yckC + wAAADsABataJCQAAAUpJREFUOE9jGLzg7gL2/7fmcf6/Oofr/8UZvP+hwsSD60CNfx41/v/zsOH/yckC pBtwfjov3ICDPSKkG3B8kiBQc93/Pw+q/u9oFydswKWZPP/PTuX7fxKo8Ui/0P993SJAzeX//94r+r++ Qeb/qhq5/0srFf/PL1X+P6tIFdPAU0B//nlYD9RUC8SV///cKwHivP9/72b+/3sn+f/f23H//92MAOKQ /5NyNDENONQrDHbu3/ulQI0FQI3ZQI2pQI0J///digZqDPv/70bQ/3/X/f53peliGrCzXeL/lmap/+vA @@ -266,4 +266,7 @@ True + + True + \ No newline at end of file