diff options
author | Paladox none <thomasmulhall410@yahoo.com> | 2019-06-26 13:33:49 +0000 |
---|---|---|
committer | Paladox none <thomasmulhall410@yahoo.com> | 2019-07-17 15:35:58 +0000 |
commit | c72c0c6fc0a65897b14425b5933f5e7ce122edd1 (patch) | |
tree | b5433a2eab9850952b989b7cd1f30d4c6994836e | |
parent | 833ae3014228c1c4a8c20db0d57d1cc739bec3f9 (diff) |
Add support for /groups
The /groups url seems to work in PolyGerrit so there's no reason
to blacklist it.
Change-Id: I78bffe2796e1953efbbbf9d45479a1d7bd918928
(cherry picked from commit a463d75a554b564c9b952856f2c1b1b6fac2a850)
-rw-r--r-- | polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.js | 8 | ||||
-rw-r--r-- | polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.html | 11 |
2 files changed, 1 insertions, 18 deletions
diff --git a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.js b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.js index 018294d5a8..69fc89ff0b 100644 --- a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.js +++ b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.js @@ -277,8 +277,7 @@ if (!account) { return; } this.$.restAPI.getPreferences().then(prefs => { - this._userLinks = - prefs.my.map(this._fixCustomMenuItem).filter(this._isSupportedLink); + this._userLinks = prefs.my.map(this._fixCustomMenuItem); }); }, @@ -313,11 +312,6 @@ return linkObj; }, - _isSupportedLink(linkObj) { - // Groups are not yet supported. - return !linkObj.url.startsWith('/groups'); - }, - _generateSettingsLink() { return this.getBaseUrl() + '/settings/'; }, diff --git a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.html b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.html index 5df544440e..d39138086f 100644 --- a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.html +++ b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.html @@ -91,17 +91,6 @@ limitations under the License. ]); }); - test('filter unsupported urls', () => { - assert.deepEqual([ - {url: '/c/331788/'}, - {url: '/groups/self'}, - {url: 'https://awesometown.com/#hashyhash'}, - ].filter(element._isSupportedLink), [ - {url: '/c/331788/'}, - {url: 'https://awesometown.com/#hashyhash'}, - ]); - }); - test('user links', () => { const defaultLinks = [{ title: 'Faves', |