mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
replace circle in function name with humhub
This commit is contained in:
parent
a7a5020871
commit
d673b82bad
@ -38,7 +38,7 @@ export enum RIGHTS {
|
||||
OPEN_CREATIONS = 'OPEN_CREATIONS',
|
||||
USER = 'USER',
|
||||
GMS_USER_PLAYGROUND = 'GMS_USER_PLAYGROUND',
|
||||
CIRCLES_AUTO_LOGIN = 'CIRCLES_AUTO_LOGIN',
|
||||
HUMHUB_AUTO_LOGIN = 'HUMHUB_AUTO_LOGIN',
|
||||
// Moderator
|
||||
SEARCH_USERS = 'SEARCH_USERS',
|
||||
ADMIN_CREATE_CONTRIBUTION = 'ADMIN_CREATE_CONTRIBUTION',
|
||||
|
||||
@ -30,5 +30,5 @@ export const USER_RIGHTS = [
|
||||
RIGHTS.OPEN_CREATIONS,
|
||||
RIGHTS.USER,
|
||||
RIGHTS.GMS_USER_PLAYGROUND,
|
||||
RIGHTS.CIRCLES_AUTO_LOGIN,
|
||||
RIGHTS.HUMHUB_AUTO_LOGIN,
|
||||
]
|
||||
|
||||
@ -704,10 +704,10 @@ export class UserResolver {
|
||||
return result
|
||||
}
|
||||
|
||||
@Authorized([RIGHTS.CIRCLES_AUTO_LOGIN])
|
||||
@Authorized([RIGHTS.HUMHUB_AUTO_LOGIN])
|
||||
@Query(() => String)
|
||||
async authenticateCirclesAutoLogin(@Ctx() context: Context): Promise<string> {
|
||||
logger.info(`authenticateCirclesAutoLogin()...`)
|
||||
async authenticateHumhubAutoLogin(@Ctx() context: Context): Promise<string> {
|
||||
logger.info(`authenticateHumhubAutoLogin()...`)
|
||||
const dbUser = getUser(context)
|
||||
const humhubClient = HumHubClient.getInstance()
|
||||
if (!humhubClient) {
|
||||
|
||||
@ -28,9 +28,9 @@ export const authenticateGmsUserSearch = gql`
|
||||
}
|
||||
`
|
||||
|
||||
export const authenticateCirclesAutoLogin = gql`
|
||||
export const authenticateHumhubAutoLogin = gql`
|
||||
query {
|
||||
authenticateCirclesAutoLogin
|
||||
authenticateHumhubAutoLogin
|
||||
}
|
||||
`
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
v-if="this.humhubAllowed"
|
||||
variant="gradido"
|
||||
:disabled="this.enableButton === false"
|
||||
@click="authenticateCirclesAutoLogin"
|
||||
@click="authenticateHumhubAutoLogin"
|
||||
target="_blank"
|
||||
>
|
||||
{{ $t('circles.button') }}
|
||||
@ -32,7 +32,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { authenticateCirclesAutoLogin } from '@/graphql/queries'
|
||||
import { authenticateHumhubAutoLogin } from '@/graphql/queries'
|
||||
export default {
|
||||
name: 'Circles',
|
||||
data() {
|
||||
@ -46,20 +46,20 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async authenticateCirclesAutoLogin() {
|
||||
async authenticateHumhubAutoLogin() {
|
||||
this.enableButton = false
|
||||
this.humhubUri = null
|
||||
this.$apollo
|
||||
.query({
|
||||
query: authenticateCirclesAutoLogin,
|
||||
query: authenticateHumhubAutoLogin,
|
||||
fetchPolicy: 'network-only',
|
||||
})
|
||||
.then(async (result) => {
|
||||
window.open(result.data.authenticateCirclesAutoLogin, '_blank')
|
||||
window.open(result.data.authenticateHumhubAutoLogin, '_blank')
|
||||
this.enableButton = true
|
||||
})
|
||||
.catch(() => {
|
||||
this.toastError('authenticateCirclesAutoLogin failed!')
|
||||
this.toastError('authenticateHumhubAutoLogin failed!')
|
||||
this.enableButton = true
|
||||
})
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user