|
@@ -234,6 +234,9 @@ func (m *WorkDesktopMenu) WorkMenuFormat() ([]*pb.MenuList, error) {
|
|
|
}
|
|
|
//0:默认展示;1:需验证权限,有权限展示;2:需验证权限,无权限也可展示(可用服务无权限不展示)
|
|
|
usable := m.VerifyPermissions(tv.PowerIds)
|
|
|
+ if tv.Id == 580 || tv.Id == 581 {
|
|
|
+ logx.Info(m.PositionId, tv.CheckCode, "---------------33333----------------------", tv.Name, usable, "=======================", m.VerifyPermissions(tv.PermissionCode))
|
|
|
+ }
|
|
|
//checkCode==1 验证权限结果 无权限不显示
|
|
|
if !usable && tv.CheckCode == 1 {
|
|
|
continue
|
|
@@ -243,9 +246,6 @@ func (m *WorkDesktopMenu) WorkMenuFormat() ([]*pb.MenuList, error) {
|
|
|
title, content, confirmUrl, confirmText, isShowCancel, appType, openType, feasibility = tv.AdditionalInfo.Title, tv.AdditionalInfo.Content, tv.AdditionalInfo.ConfirmUrl, tv.AdditionalInfo.ConfirmText, tv.AdditionalInfo.IsShowCancel, tv.AdditionalInfo.AppType, tv.AdditionalInfo.OpenType, usable
|
|
|
)
|
|
|
|
|
|
- if tv.Id == 580 || tv.Id == 581 {
|
|
|
- logx.Info(m.PositionId, tv.Id, "---------------33333----------------------", tv.Name, usable, "=======================", m.VerifyPermissions(tv.PermissionCode))
|
|
|
- }
|
|
|
//三级菜单------
|
|
|
if len(tv.Children) == 0 && (tv.CapitalCode != "" || tv.PermissionCode != "") {
|
|
|
//用户是否需要留资
|
|
@@ -355,9 +355,6 @@ func (m *WorkDesktopMenu) VerifyPermissions(powerIds string) (b bool) {
|
|
|
}
|
|
|
if len(strings.Split(powerIds, ",")) > 0 {
|
|
|
userPower := m.AutoUserPowerInfo() //m.TimeOut, m.BigMemberOff,
|
|
|
- if m.PositionId == 870425 {
|
|
|
- logx.Info(powerIds, "---------------------------------------------", m.PositionId, "----------", userPower)
|
|
|
- }
|
|
|
func(powerIds string) {
|
|
|
for _, pv := range strings.Split(powerIds, ",") {
|
|
|
if userPower[pv] > 0 {
|
|
@@ -366,6 +363,9 @@ func (m *WorkDesktopMenu) VerifyPermissions(powerIds string) (b bool) {
|
|
|
}
|
|
|
}
|
|
|
}(powerIds)
|
|
|
+ if m.PositionId == 870425 {
|
|
|
+ logx.Info(powerIds, "---------------------------------------------", m.PositionId, "----------", userPower, "------", b)
|
|
|
+ }
|
|
|
}
|
|
|
return
|
|
|
}
|