职责分离 [英] Segregation of Duties
问题描述
亲爱的专家
我还有一个关于超级的问题用户,我在我的申请中完成了职责分离,如下所示:
(1)销售
( 2)购买
(3)商店
(4)财务
< p style ="">(5)工资
(6)库存
(7)经理
通过使用下面的代码与用户权限表和登录表单合作,它非常有效的问题。现在我想让拥有用户权限的用户称为 " Managers" 访问整个应用程序,
那么我该如何修改下面的代码?
这是在公开赛上
Dim strSelling As String
strSelling ="销售额"
如果Forms!FrmLogin!CboUserRights.Column(2)<> [strSeling]然后
MsgBox"您无权打开此表单"
取消=真
退出子
结束如果
End Sub
此代码粘贴在所选表单后面,因此如果登录为"销售额"我将能够访问与销售模块相关的所有领域。现在我希望将用户包括在内经理人权利以及他们以及
访问销售模块,是否可以修改上述代码。假设我声明经理权利如下:
Dim strAdmin As string
strAdmin ="经理"
请注意所有表格均来自总机经理
问候
< p style =""> Chris
Hello Chris,
>>  ;如果登录为"销售额"我将能够访问与销售模块相关的所有领域。现在我希望将用户包括在内经理人权利以及他们也访问销售模块
我认为你只需要添加一个If条件来检查Forms!FrmLogin!CboUserRights.Column(2)是否等于strAdmin。
例如
Dim strSelling As String
strSelling ="销售"
Dim strAdmin As string
strAdmin ="管理者"
'如果用户是经理,则无需检查销售额
如果Forms!FrmLogin!CboUserRights.Column(2)= [strAdmin]则
MsgBox" Manager可以打开此表单"
exit sub
结束如果
如果Forms!FrmLogin!CboUserRights.Column(2)<> [strSeling]然后
MsgBox"您无权打开此表单"
取消= True
退出Sub
结束如果
问候,
Celeste
Dear Experts
I have one more issue concerning the super user , I have done the segregation of duties in my application as follows:
(1) Sales
(2) Purchases
(3) Stores
(4) Finance
(5) Salaries
(6) Inventory
(7) Managers
by using the code below in collaboration with the user rights table and the login form , it works very well no issues. Now I want to make people with user rights called "Managers" access the entire application, then how can I amend the code below?
It is on open event
Dim strSelling As String
strSelling = " Sales"
If Forms!FrmLogin!CboUserRights.Column(2) <> [strSeling] Then
MsgBox " Your not authorized to open this form"
Cancel = True
Exit Sub
End If
End Sub
This code is pasted behind the selected forms , and so if login as " Sales " I will be able to access all the areas relating to sales module. Now I want include the users with " Managers " rights as well so that they as well access the sales module, is it possible to amend the above code. Assuming I declare the managers rights as below:
Dim strAdmin As string
strAdmin = " Managers"
Kindly note all the forms are operated from the switchboard manager
Regards
Chris
Hello Chris,
>> if login as " Sales " I will be able to access all the areas relating to sales module. Now I want include the users with " Managers " rights as well so that they as well access the sales module
I think you just need to add an If condition to check if Forms!FrmLogin!CboUserRights.Column(2) equals to strAdmin.
E.g.
Dim strSelling As String strSelling = " Sales" Dim strAdmin As string strAdmin = " Managers" 'if user is manager, no need checking for sales If Forms!FrmLogin!CboUserRights.Column(2) =[strAdmin] Then MsgBox "Manager could open this form" exit sub End if If Forms!FrmLogin!CboUserRights.Column(2) <> [strSeling] Then MsgBox " Your not authorized to open this form" Cancel = True Exit Sub End IfRegards,
Celeste
这篇关于职责分离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!