Failed to execute template. Cause: [Access denied when checking [script] access to [xwiki:Collaboratory.UX.HbpSkin.WebHome] for user [xwiki:XWiki.Admin]]. Click on this message for details.

Context Search - HBP Wiki

IAM21 instance, do not create collab nor modify a team, your changes will be lost


Changes for page Context Search

Last modified by bougault on 2023/02/20 16:29

From version 27.19
edited by bougault
on 2022/11/17 13:29
Change comment: There is no comment for this version
To version 27.26
edited by bougault
on 2022/11/17 13:37
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -41,7 +41,7 @@
41 41   this.editor = false;
42 42   this.viewer = false;
43 43   this.rolesFilter = [];
44 - this.filterUrl = new URL(`${document.location.origin}/rest/v1/collabs?search=&offset=0&orderField=title&order=asc&favorite=&roles=`);
44 + this.filterUrl = new URL(`${document.location.origin}/rest/v1/collabs?search=&offset=0&orderField=title&order=asc&limit=10000&favorite=false&roles=`);
45 45   this.results = [];
46 46   }
47 47   toggleRoleFilter(roleName) {
... ... @@ -51,6 +51,7 @@
51 51   this.rolesFilter.filter(role => role !== roleName);
52 52   }
53 53   this[roleName] = !this[roleName];
54 + console.log(this.rolesFilter);
54 54   this.filterUrl.searchParams.set('roles', this.rolesFilter.join("+"));
55 55   this.handleSearch();
56 56   }
... ... @@ -91,7 +91,7 @@
91 91   }
92 92   fetchFilterSearch() {
93 93   return new Promise((resolve) => {
94 - if(this.hasActiveFilters) {
95 + if(this.hasActiveFilters()) {
95 95   fetch(this.filterUrl).then(res => res.json()).then(resolve);
96 96   } else {
97 97   resolve(null);
... ... @@ -101,7 +101,7 @@
101 101   filterResults = (filteredCollabs) => {
102 102   console.log("filteredCollabs:", filteredCollabs, "search results:", this.results);
103 103   const collabSpaces = filteredCollabs.map(collab => `Collabs.${collab.name}`);
104 - const filteredResults = this.results.filter(result => collabsSpace.some(space => result.startsWith(space)));
105 + const filteredResults = this.results.filter(result => collabSpaces.some(space => result.space.startsWith(space)));
105 105   console.log(filteredResults);
106 106   }
107 107   getLink(xwikiDocSpace) {