Project

General

Profile

Patch #21582 » roles_duping_scope.diff

dup ary not scope - Ondřej Ezr, 2015-12-22 00:32

View differences:

app/models/user.rb
544 544
    # No role on archived projects
545 545
    return [] if project.nil? || project.archived?
546 546
    if membership = membership(project)
547
      membership.roles.dup
547
      membership.roles.to_a.dup
548 548
    elsif project.is_public?
549 549
      project.override_roles(builtin_role)
550 550
    else
    (1-1/1)