Skip to content

Commit

Permalink
fix: fix suggesting site in select protected Resource drawer - EXO-70336
Browse files Browse the repository at this point in the history
  (#71)

Before this change, when listing the navigations to selected to be protected not all navigations were listed since it uses an old API for navigation
After this change, all sites are listed when using the new sites API
  • Loading branch information
GouadriaHanen authored Mar 29, 2024
1 parent 55bb33b commit 44ff12e
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</template>

<script>
import {getNavigations, getProtectedNavigations} from '../multiFactorServices';
import {getProtectedNavigations} from '../multiFactorServices';
export default {
data: () => ({
drawer: false,
Expand Down Expand Up @@ -140,15 +140,15 @@ export default {
}
},
getNavigations() {
getNavigations().then(data => {
return this.$siteService.getSites(null, 'USER', 'global', true).then(data => {
const navs = data;
navs.forEach(nav => {
nav.name = nav.key.name ;
if (nav.key.type === 'PORTAL') {
nav.id=`/portal/${nav.key.name}`;
} else if (nav.key.type === 'GROUP') {
const modifiedName = nav.key.name.replaceAll('/',':');
nav.id=`/portal/g/${modifiedName}`;
nav.label = nav.displayName ;
if (nav.siteType === 'PORTAL') {
nav.id =`/portal/${nav.name}`;
} else if (nav.siteType === 'GROUP') {
const modifiedName = nav.name.replaceAll('/',':');
nav.id =`/portal/g/${modifiedName}`;
}
});
this.navigations = navs;
Expand Down

0 comments on commit 44ff12e

Please sign in to comment.