Skip to content

Commit

Permalink
fix: permission access getting clubbed (#6045)
Browse files Browse the repository at this point in the history
  • Loading branch information
prkhrkat authored Nov 4, 2024
1 parent c8fa8cb commit 4288e91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/auth/user/UserCommonService.go
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,9 @@ func BuildRoleFilterKeyForOtherEntity(roleFilterMap map[string]*bean.RoleFilter,
func (impl UserCommonServiceImpl) GetUniqueKeyForAllEntity(role repository.RoleModel) string {
key := ""
if len(role.Team) > 0 && role.Entity != bean2.EntityJobs {
key = fmt.Sprintf("%s_%s_%s", role.Team, role.Action, role.AccessType)
key = fmt.Sprintf("%s_%s_%s_%s", role.Team, role.Environment, role.Action, role.AccessType)
} else if role.Entity == bean2.EntityJobs {
key = fmt.Sprintf("%s_%s_%s_%s", role.Team, role.Action, role.AccessType, role.Entity)
key = fmt.Sprintf("%s_%s_%s_%s_%s", role.Team, role.Environment, role.Action, role.AccessType, role.Entity)
} else if len(role.Entity) > 0 {
if role.Entity == bean2.CLUSTER_ENTITIY {
key = fmt.Sprintf("%s_%s_%s_%s_%s", role.Entity, role.Action, role.Cluster,
Expand Down

0 comments on commit 4288e91

Please sign in to comment.