Project

General

Profile

Defect #25258 » user.rb.patch

roles_for_project() returning only unique roles - Marcin Szewczyk, 2017-03-03 23:56

View differences:

app/models/user.rb 2014-07-09 22:41:12.000000000 +0200 → app/models/user.rb 2017-03-03 13:31:36.000000000 +0100
490 490
    # No role on archived projects
491 491
    return roles if project.nil? || project.archived?
492 492
    if membership = membership(project)
493
      roles = membership.roles
493
      roles = membership.roles.uniq
494 494
    else
495 495
      roles << builtin_role
496 496
    end
    (1-1/1)