@@ -638,7 +638,9 @@ func (impl UserCommonServiceImpl) BuildRoleFilterKeyForJobs(roleFilterMap map[st
638
638
roleFilterMap [key ].Environment = fmt .Sprintf ("%s,%s" , roleFilterMap [key ].Environment , role .Environment )
639
639
}
640
640
entityArr := strings .Split (roleFilterMap [key ].EntityName , "," )
641
- if ! containsArr (entityArr , role .EntityName ) {
641
+ if containsArr (entityArr , bean2 .EmptyStringIndicatingAll ) {
642
+ roleFilterMap [key ].EntityName = bean2 .EmptyStringIndicatingAll
643
+ } else if ! containsArr (entityArr , role .EntityName ) {
642
644
roleFilterMap [key ].EntityName = fmt .Sprintf ("%s,%s" , roleFilterMap [key ].EntityName , role .EntityName )
643
645
}
644
646
workflowArr := strings .Split (roleFilterMap [key ].Workflow , "," )
@@ -657,7 +659,9 @@ func (impl UserCommonServiceImpl) BuildRoleFilterKeyForOtherEntity(roleFilterMap
657
659
roleFilterMap [key ].Environment = fmt .Sprintf ("%s,%s" , roleFilterMap [key ].Environment , role .Environment )
658
660
}
659
661
entityArr := strings .Split (roleFilterMap [key ].EntityName , "," )
660
- if ! containsArr (entityArr , role .EntityName ) {
662
+ if containsArr (entityArr , bean2 .EmptyStringIndicatingAll ) {
663
+ roleFilterMap [key ].EntityName = bean2 .EmptyStringIndicatingAll
664
+ } else if ! containsArr (entityArr , role .EntityName ) {
661
665
roleFilterMap [key ].EntityName = fmt .Sprintf ("%s,%s" , roleFilterMap [key ].EntityName , role .EntityName )
662
666
}
663
667
}
0 commit comments