权限记录 方面 的一些 查询语句-没发布

by 祁宏伟 2012.1.29 18:18

注:脚本执行有风险,对于客户正式环境请在研发指导下执行。

--查重复的权限数据,-可能 会导致 代码错误。 

select ID,[User],AuthorityItem,Org, * from UBF_Security_AuthorityCredential as a3 where ID in ( SELECT distinct a1.ID FROM UBF_Security_AuthorityCredential as a1 inner join UBF_Security_AuthorityCredential as a2 on ( a1.[User] = a2.[User] and a1.AuthorityItem =a2.AuthorityItem and a1.Org =a2.Org and a1.ID != a2.ID and a1.TaskType = a2.TaskType and a1.AuthorityItemType!=300 and a2.AuthorityItemType !=300 and a1.AuthorityItemType!=4 and a2.AuthorityItemType!=4 and a1.AuthorityItemType!=1 and a1.AuthorityItemType!=1)) order by a3.AuthorityItem

 

 --查某角色的权限

select * from UBF_Security_RightAssign

inner join ubf_security_right as r on r.ID = [Right] inner join UBF_Security_Task as t on r.Task=t.ID where Org =1001005191137245  and t.AuthorityItemId=1001102064613672

  • --查询权限角色预置的功能
  • --对于新增菜单,需要在此处预置条记录,才可使某些角色默认就具有这个菜单访问功能。不用自己再给自己分配一下。
  •  select * from UBF_Security_PrefabAuthority

 

UI界面处理权限代码:

U9.VOB.PD.Common\CommonService\Code\UFIDA.U9.UI.PDHelper\Authorization\FormAuthorityHelper.cs

U9.VOB.BSV2\AutoCoding\CodingApp\Security\Code\UFIDA.U9.Security.BPServiceImp\BPService.cs

   UFIDA.U9.Security.BPServiceImp.DLL!UFIDA.U9.Security.BPServiceImp.SecurityCache.GlobalMenuCacheStruct.CheckParameterAcl(System.Collections.Generic.List<UFIDA.U9.Security.Authority.URLPareterData> list = Count = 1) 行509 C#
  UFIDA.U9.Security.BPServiceImp.DLL!UFIDA.U9.Security.BPServiceImp.SecurityCache.GlobalMenuCacheStruct.GetMenuUrlKey(string pageURL = "CBO.MFG.BOM.BOM") 行454 + 0x2e 字节 C#
  UFIDA.U9.Security.BPServiceImp.DLL!UFIDA.U9.Security.BPServiceImp.SecurityCache.IsUrlValidata(string url = "37FD2E6F-80C2-44FE-97F4-F6C10876D1FE", long orgID = 1001105130000016, long userID = 1001105160000096, ref string errorStr = "在组织集团公司中,您无权访问该地址页面:[关键业务点菜单未授权,所在产品号为0!]") 行1037 + 0x25 字节 C#
  UFIDA.U9.Security.BPServiceImp.DLL!UFIDA.U9.Security.BPServiceImp.BPService.IsUrlValidata(string url = "37fd2e6f-80c2-44fe-97f4-f6c10876d1fe", long orgID = 1001105130000016, long userID = 1001105160000096) 行995 + 0x2b 字节 C#
> UFIDA.U9.UI.PDHelper.dll!UFIDA.U9.UI.PDHelper.FormAuthorityHelper.CheckUrlByFormGuid(string formGuid = "37fd2e6f-80c2-44fe-97f4-f6c10876d1fe") 行185 + 0x6c 字节 C#
  UFIDA.U9.UI.PDHelper.dll!UFIDA.U9.UI.PDHelper.FormAuthorityHelper.CheckUrl(UFSoft.UBF.UI.ControlModel.IPopupForm ctrl = {Text = "BOM"}) 行169 + 0x1e 字节 C#
  UFIDA.U9.UI.PDHelper.dll!UFIDA.U9.UI.PDHelper.FormAuthorityHelper.SetAuthorizationType(UFSoft.UBF.UI.IView.IPart webPart = {UFIDA.U9.PM.PurchaseOrderUIModel.PurchaseOrderMainUIFormWebPart}, object obj = {Text = "BOM"}) 行149 + 0xc 字节 C#
  UFIDA.U9.UI.PDHelper.dll!UFIDA.U9.UI.PDHelper.FormAuthorityHelper.SetWebPartAuthorization(UFSoft.UBF.UI.IView.IPart webPart = {UFIDA.U9.PM.PurchaseOrderUIModel.PurchaseOrderMainUIFormWebPart}, UFSoft.UBF.UI.ControlModel.IContainer container = {UFSoft.UBF.UI.WebControlAdapter.UFWebTabPageAdapter}) 行261 + 0xf 字节 C#

 

 

不允许评论

RecentComments

评论 RSS

Statistics

989 篇文章
0 个单页
775956 条评论
11 次评分
1443476 次访问
访问统计开始于 2019年12月15日
平均日访问 6808 次
当前 106 人在线