Skip to content

Commit 4288e91

Browse files
authored
fix: permission access getting clubbed (#6045)
1 parent c8fa8cb commit 4288e91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/auth/user/UserCommonService.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,9 +697,9 @@ func BuildRoleFilterKeyForOtherEntity(roleFilterMap map[string]*bean.RoleFilter,
697697
func (impl UserCommonServiceImpl) GetUniqueKeyForAllEntity(role repository.RoleModel) string {
698698
key := ""
699699
if len(role.Team) > 0 && role.Entity != bean2.EntityJobs {
700-
key = fmt.Sprintf("%s_%s_%s", role.Team, role.Action, role.AccessType)
700+
key = fmt.Sprintf("%s_%s_%s_%s", role.Team, role.Environment, role.Action, role.AccessType)
701701
} else if role.Entity == bean2.EntityJobs {
702-
key = fmt.Sprintf("%s_%s_%s_%s", role.Team, role.Action, role.AccessType, role.Entity)
702+
key = fmt.Sprintf("%s_%s_%s_%s_%s", role.Team, role.Environment, role.Action, role.AccessType, role.Entity)
703703
} else if len(role.Entity) > 0 {
704704
if role.Entity == bean2.CLUSTER_ENTITIY {
705705
key = fmt.Sprintf("%s_%s_%s_%s_%s", role.Entity, role.Action, role.Cluster,

0 commit comments

Comments
 (0)