以文本方式查看主题
- Foxtable(狐表) (http://foxtable.net/bbs/index.asp)
-- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2)
---- [求助]导入和导出能否设置权限 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=71157)
|
-- 作者:260964006
-- 发布时间:2015/7/6 14:23:00
-- [求助]导入和导出能否设置权限
杂项中的“导入”“导出”和“合并”能否屏蔽,除开发者和管理员都不能使用,或者对用户设置权限拥有呢?怎么设置?谢谢
|
-- 作者:大红袍
-- 发布时间:2015/7/6 15:00:00
--
1、导入菜单模板;
http://www.foxtable.com/help/topics/1079.htm
2、控制权限
http://www.foxtable.com/help/topics/2438.htm
|
-- 作者:260964006
-- 发布时间:2015/7/6 15:58:00
--
For Each t As Table In Tables \'显示所有表和列 t.Visible = True t.AllowEdit = True For Each c As Col In t.Cols c.Visible = True c.AllowEdit = True Next If User.Name = "用户名" Then RibbonTabs("Table").Visible = False RibbonTabs("Project").Visible = False RibbonTabs("Other").Visible = False Else RibbonTabs("Table").Visible = True RibbonTabs("Project").Visible = True RibbonTabs("Other").Visible = True End If Next Tables("授权表").Visible = (User.Type <> UserTypeEnum.User ) If User.Type <> UserTypeEnum.User Then Return End If For Each dr As DataRow In DataTables("授权表").Select("用户名 = \'" & User.Name & "\'" ) If dr.IsNull("列名") Then For Each t As Table In Tables If t.DataTable.Name = dr("表名") Then t.Visible = Not dr("不可见") t.AllowEdit = Not dr("不可编辑") End If Next Else For Each t As Table In Tables If t.DataTable.Name = dr("表名") Then For Each c As Col In t.Cols If c.Name = dr("列名") Then c.Visible = Not dr("不可见") c.AllowEdit = Not dr("不可编辑") End If Next End If Next End If Next
程序如上:但结果是 杂项中的“导出”“合并”没有屏蔽到呢?
|
-- 作者:大红袍
-- 发布时间:2015/7/6 16:41:00
--
单独写
If User.Name <> "开发者" andAlso User.Name <> "管理员" Then RibbonTabs("Table").Visible = False RibbonTabs("Project").Visible = False RibbonTabs("Other").Visible = False Else RibbonTabs("Table").Visible = True RibbonTabs("Project").Visible = True RibbonTabs("Other").Visible = True End If
|
-- 作者:260964006
-- 发布时间:2015/7/6 16:58:00
--
谢谢
|