-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
…/not-found-page * 'develop' of github.com:RocketChat/Rocket.Chat: Chore: Remove settings Fibers usage (#26465) Chore: Refactor create-target-channel util (#26493) Chore: useEndpointData deprecation (#26494) [NEW] Surface featured apps endpoint (#26416) [FIX] Request at least one field in the payload of `/v1/users.setStatus` (#26490) Chore: Exit process on `unhandledRejection` on CI (#26467) [FIX] Clear push token on save user password (#26466) [FIX] Undefined MediaDevices error on HTTP (#26396) Chore: Codecov threshold (#26477)
- Loading branch information
Showing
106 changed files
with
1,156 additions
and
1,294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
...d/server/functions/disconnectWorkspace.js → ...d/server/functions/disconnectWorkspace.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import { Settings } from '@rocket.chat/models'; | ||
|
||
import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; | ||
import { Settings } from '../../../models/server'; | ||
|
||
export function disconnectWorkspace() { | ||
export async function disconnectWorkspace() { | ||
const { connectToCloud } = retrieveRegistrationStatus(); | ||
if (!connectToCloud) { | ||
return true; | ||
} | ||
|
||
Settings.updateValueById('Register_Server', false); | ||
await Settings.updateValueById('Register_Server', false); | ||
|
||
return true; | ||
} |
10 changes: 5 additions & 5 deletions
10
...ver/functions/getOAuthAuthorizationUrl.js → ...ver/functions/getOAuthAuthorizationUrl.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import { Random } from 'meteor/random'; | ||
import { Settings } from '@rocket.chat/models'; | ||
|
||
import { getRedirectUri } from './getRedirectUri'; | ||
import { Settings } from '../../../models/server'; | ||
import { settings } from '../../../settings/server'; | ||
import { userScopes } from '../oauthScopes'; | ||
|
||
export function getOAuthAuthorizationUrl() { | ||
export async function getOAuthAuthorizationUrl() { | ||
const state = Random.id(); | ||
|
||
Settings.updateValueById('Cloud_Workspace_Registration_State', state); | ||
await Settings.updateValueById('Cloud_Workspace_Registration_State', state); | ||
|
||
const cloudUrl = settings.get('Cloud_Url'); | ||
const client_id = settings.get('Cloud_Workspace_Client_Id'); | ||
const clientId = settings.get('Cloud_Workspace_Client_Id'); | ||
const redirectUri = getRedirectUri(); | ||
|
||
const scope = userScopes.join(' '); | ||
|
||
return `${cloudUrl}/authorize?response_type=code&client_id=${client_id}&redirect_uri=${redirectUri}&scope=${scope}&state=${state}`; | ||
return `${cloudUrl}/authorize?response_type=code&client_id=${clientId}&redirect_uri=${redirectUri}&scope=${scope}&state=${state}`; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.