Skip to content

Commit

Permalink
Merge pull request #1034 from Gepardgame/fix/issue1033
Browse files Browse the repository at this point in the history
fix: Add Oidc user to team view
  • Loading branch information
nscuro authored Oct 7, 2024
2 parents 730dc73 + 35749a7 commit c5d3ea3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/views/administration/accessmanagement/Teams.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ export default {
if (row.ldapUsers) {
count += row.ldapUsers.length;
}
if (row.oidcUsers) {
count += row.oidcUsers.length;
}
return count;
},
},
Expand Down Expand Up @@ -168,6 +171,13 @@ export default {
</span>
</div>
</b-form-group>
<b-form-group v-if="oidcUsers && oidcUsers.length > 0" :label="this.$t('admin.oidc_users')">
<div class="list-group">
<span v-for="oidcUser in oidcUsers">
<actionable-list-group-item :value="oidcUser.username" :delete-icon="true" v-on:actionClicked="removeUser(oidcUser)"/>
</span>
</div>
</b-form-group>
<div style="text-align:right">
<b-button variant="outline-danger" @click="deleteTeam">{{ $t('admin.delete_team') }}</b-button>
</div>
Expand Down Expand Up @@ -197,6 +207,7 @@ export default {
mappedOidcGroups: row.mappedOidcGroups,
managedUsers: row.managedUsers,
ldapUsers: row.ldapUsers,
oidcUsers: row.oidcUsers,
labelIcon: {
dataOn: '\u2713',
dataOff: '\u2715',
Expand Down Expand Up @@ -433,6 +444,15 @@ export default {
}
this.ldapUsers = k;
}
if (this.oidcUsers) {
let k = [];
for (let i = 0; i < this.oidcUsers.length; i++) {
if (this.oidcUsers[i].username !== user.username) {
k.push(this.oidcUsers[i]);
}
}
this.oidcUsers = k;
}
this.$toastr.s(this.$t('message.updated'));
})
.catch((error) => {
Expand Down

0 comments on commit c5d3ea3

Please sign in to comment.