|
@@ -386,7 +386,19 @@ func (m *WorkDesktopMenu) VerifyPermissions(powerIds string, excludeCodes string
|
|
|
userPower := m.AutoUserPowerInfo() //m.TimeOut, m.BigMemberOff,
|
|
|
if len(strings.Split(powerIds, ",")) > 0 {
|
|
|
for _, pv := range strings.Split(powerIds, ",") {
|
|
|
- if userPower[pv] > 0 {
|
|
|
+ //同时满足
|
|
|
+ if pvs := strings.Split(pv, "+"); len(pvs) > 1 {
|
|
|
+ var pi int
|
|
|
+ for _, v := range pvs {
|
|
|
+ if userPower[v] > 0 {
|
|
|
+ pi++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if pi == len(pvs) {
|
|
|
+ pb.HasBool = true
|
|
|
+ break
|
|
|
+ }
|
|
|
+ } else if userPower[pv] > 0 {
|
|
|
pb.HasBool = true
|
|
|
break
|
|
|
}
|
|
@@ -394,7 +406,19 @@ func (m *WorkDesktopMenu) VerifyPermissions(powerIds string, excludeCodes string
|
|
|
}
|
|
|
if len(strings.Split(excludeCodes, ",")) > 0 {
|
|
|
for _, pv := range strings.Split(excludeCodes, ",") {
|
|
|
- if userPower[pv] > 0 {
|
|
|
+ //同时满足
|
|
|
+ if ecs := strings.Split(pv, "+"); len(ecs) > 1 {
|
|
|
+ var ei int
|
|
|
+ for _, v := range ecs {
|
|
|
+ if userPower[v] > 0 {
|
|
|
+ ei++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ei == len(ecs) {
|
|
|
+ pb.ExcludeBool = true
|
|
|
+ break
|
|
|
+ }
|
|
|
+ } else if userPower[pv] > 0 {
|
|
|
pb.ExcludeBool = true
|
|
|
break
|
|
|
}
|