-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure that allChatScopes provides all scopes needed (#2844)
allChatScopes provides all scopes that may be need when using chat component. uses the current config for the person card to determine some of the scopes
- Loading branch information
1 parent
080a733
commit 9c84955
Showing
5 changed files
with
77 additions
and
18 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
22 changes: 22 additions & 0 deletions
22
packages/mgt-chat/src/statefulClient/chatOperationScopes.tests.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { expect } from '@open-wc/testing'; | ||
import { allChatScopes } from './chatOperationScopes'; | ||
|
||
describe('chatOperationScopes tests', () => { | ||
it('should have a minimal permission set', () => { | ||
const expectedScopes = [ | ||
'User.Read', | ||
'User.ReadBasic.All', | ||
'User.Read.All', | ||
'People.Read', | ||
'People.Read.All', | ||
'Presence.Read.All', | ||
'Sites.Read.All', | ||
'Mail.Read', | ||
'Mail.ReadBasic', | ||
'Contacts.Read', | ||
'Chat.ReadWrite', | ||
'ChatMember.ReadWrite' | ||
]; | ||
expect(allChatScopes).to.have.members(expectedScopes); | ||
}); | ||
}); |
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