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 a463d75a55)
This commit is contained in:
@@ -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/';
|
||||
},
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user