forked from vikunja/frontend
Compare commits
4 Commits
f9dad79b23
...
85f1262fc4
Author | SHA1 | Date |
---|---|---|
viehlieb | 85f1262fc4 | |
viehlieb | 44719c9780 | |
viehlieb | b28444148e | |
viehlieb | 4ee785a3df |
|
@ -15,7 +15,12 @@ export const redirectToProvider = (provider: IProvider, redirectUrl = '') => {
|
|||
const state = createRandomID(24)
|
||||
localStorage.setItem('state', state)
|
||||
|
||||
window.location.href = `${provider.authUrl}?client_id=${provider.clientId}&redirect_uri=${redirectUrl}${provider.key}&response_type=code&scope=openid email profile&state=${state}`
|
||||
let scope = 'openid email profile'
|
||||
if (provider.scope !== null){
|
||||
scope = provider.scope
|
||||
}
|
||||
|
||||
window.location.href = `${provider.authUrl}?client_id=${provider.clientId}&redirect_uri=${redirectUrl}${provider.key}&response_type=code&scope=${scope}&state=${state}`
|
||||
}
|
||||
export const redirectToProviderOnLogout = (provider: IProvider) => {
|
||||
if (provider.logoutUrl.length > 0){
|
||||
|
|
|
@ -9,6 +9,7 @@ export interface ITeam extends IAbstract {
|
|||
description: string
|
||||
members: ITeamMember[]
|
||||
right: Right
|
||||
oidcId: string
|
||||
|
||||
createdBy: IUser
|
||||
created: Date
|
||||
|
|
|
@ -13,6 +13,7 @@ export default class TeamModel extends AbstractModel<ITeam> implements ITeam {
|
|||
description = ''
|
||||
members: ITeamMember[] = []
|
||||
right: Right = RIGHTS.READ
|
||||
oidcId = ''
|
||||
|
||||
createdBy: IUser = {} // FIXME: seems wrong
|
||||
created: Date = null
|
||||
|
|
|
@ -4,4 +4,5 @@ export interface IProvider {
|
|||
authUrl: string;
|
||||
clientId: string;
|
||||
logoutUrl: string;
|
||||
scope: string;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class="loader-container is-max-width-desktop"
|
||||
:class="{ 'is-loading': teamService.loading }"
|
||||
>
|
||||
<card class="is-fullwidth" v-if="userIsAdmin" :title="title">
|
||||
<card class="is-fullwidth" v-if="userIsAdmin && team.oidcId == 0" :title="title">
|
||||
<form @submit.prevent="save()">
|
||||
<div class="field">
|
||||
<label class="label" for="teamtext">{{ $t('team.attributes.name') }}</label>
|
||||
|
@ -63,7 +63,7 @@
|
|||
</card>
|
||||
|
||||
<card class="is-fullwidth has-overflow" :title="$t('team.edit.members')" :padding="false">
|
||||
<div class="p-4" v-if="userIsAdmin">
|
||||
<div class="p-4" v-if="userIsAdmin && team.oidcId == 0">
|
||||
<div class="field has-addons">
|
||||
<div class="control is-expanded">
|
||||
<multiselect
|
||||
|
|
|
@ -12,7 +12,12 @@
|
|||
<ul class="teams box" v-if="teams.length > 0">
|
||||
<li :key="t.id" v-for="t in teams">
|
||||
<router-link :to="{name: 'teams.edit', params: {id: t.id}}">
|
||||
{{ t.name }}
|
||||
<p v-if="t.oidcId != 0">
|
||||
{{ t.name }}{{ " (sso: " + t.oidcId + ")" }}
|
||||
</p>
|
||||
<p v-else>
|
||||
{{ t.name }}
|
||||
</p>
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue