The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/app/api/server/lib/oauthApps.js

13 lines
469 B

import { OAuthApps } from '../../../models/server/raw';
import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission';
export async function findOAuthApps({ uid }) {
if (!await hasPermissionAsync(uid, 'manage-oauth-apps')) {
throw new Error('error-not-allowed');
}
return OAuthApps.find().toArray();
}
export async function findOneAuthApp({ clientId, appId }) {
return OAuthApps.findOneAuthAppByIdOrClientId({ clientId, appId });
}