Files
gerrit/polygerrit-ui/app/elements/admin/gr-project-access
Becky Siegel 57df22313d Fix access javascript errors
This change fixes two javascript errors:
1. TypeError: Cannot read property 'name' of undefined. This existed
   when a project without global capabilities was loaded after one with
   global capabilities. Inside of the section dom-repeat, the old
   section id was being used to compute the permission name. This is
   fixed by resetting sections to an empty array before setting the
   new value returned by the api.
2. TypeError: Cannot read property 'values' of undefined. This existed
   when _computeLabel was called with a label is not included in the
   list of 'labels' returned by the api. In this case, label values
   should not be rendered, the permission still exists, and acts like a
   non-label permission

Bug: Issue 7497
Change-Id: Ib7451f2bae5d2349289f41070a305bf086017c65
(cherry picked from commit 4d039c8db2)
2017-11-08 00:50:30 +00:00
..