Skip to content

Commit 5a24d14

Browse files
committed
lowercase groupType enums
1 parent 22edcc3 commit 5a24d14

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/components/mgt-people-picker/mgt-people-picker.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
141141
attribute: 'group-type',
142142
converter: (value, type) => {
143143
if (!value || value.length === 0) {
144-
return GroupType.Any;
144+
return GroupType.any;
145145
}
146146

147147
const values = value.split(',');
@@ -155,7 +155,7 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
155155
}
156156

157157
if (groupTypes.length === 0) {
158-
return GroupType.Any;
158+
return GroupType.any;
159159
}
160160

161161
// tslint:disable-next-line:no-bitwise
@@ -257,7 +257,7 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
257257

258258
private _groupId: string;
259259
private _type: PersonType = PersonType.person;
260-
private _groupType: GroupType = GroupType.Any;
260+
private _groupType: GroupType = GroupType.any;
261261

262262
private defaultPeople: IDynamicPerson[];
263263

src/graph/graph.groups.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,31 @@ export enum GroupType {
1919
/**
2020
* Any group Type
2121
*/
22-
Any = 0,
22+
any = 0,
2323

2424
/**
2525
* Office 365 group
2626
*/
2727
// tslint:disable-next-line:no-bitwise
28-
Unified = 1 << 0,
28+
unified = 1 << 0,
2929

3030
/**
3131
* Security group
3232
*/
3333
// tslint:disable-next-line:no-bitwise
34-
Security = 1 << 1,
34+
security = 1 << 1,
3535

3636
/**
3737
* Mail Enabled Security group
3838
*/
3939
// tslint:disable-next-line:no-bitwise
40-
MailEnabledSecurity = 1 << 2,
40+
mailenabledsecurity = 1 << 2,
4141

4242
/**
4343
* Distribution Group
4444
*/
4545
// tslint:disable-next-line:no-bitwise
46-
Distribution = 1 << 3
46+
distribution = 1 << 3
4747
}
4848

4949
/**
@@ -53,14 +53,14 @@ export enum GroupType {
5353
* @param {IGraph} graph
5454
* @param {string} query - what to search for
5555
* @param {number} [top=10] - number of groups to return
56-
* @param {GroupType} [groupTypes=GroupType.Any] - the type of group to search for
56+
* @param {GroupType} [groupTypes=GroupType.any] - the type of group to search for
5757
* @returns {Promise<Group[]>} An array of Groups
5858
*/
5959
export async function findGroups(
6060
graph: IGraph,
6161
query: string,
6262
top: number = 10,
63-
groupTypes: GroupType = GroupType.Any
63+
groupTypes: GroupType = GroupType.any
6464
): Promise<Group[]> {
6565
const scopes = 'Group.Read.All';
6666

@@ -69,26 +69,26 @@ export async function findGroups(
6969
filterQuery = `(startswith(displayName,'${query}') or startswith(mailNickname,'${query}') or startswith(mail,'${query}'))`;
7070
}
7171

72-
if (groupTypes !== GroupType.Any) {
72+
if (groupTypes !== GroupType.any) {
7373
const filterGroups = [];
7474

7575
// tslint:disable-next-line:no-bitwise
76-
if (GroupType.Unified === (groupTypes & GroupType.Unified)) {
76+
if (GroupType.unified === (groupTypes & GroupType.unified)) {
7777
filterGroups.push("groupTypes/any(c:c+eq+'Unified')");
7878
}
7979

8080
// tslint:disable-next-line:no-bitwise
81-
if (GroupType.Security === (groupTypes & GroupType.Security)) {
81+
if (GroupType.security === (groupTypes & GroupType.security)) {
8282
filterGroups.push('(mailEnabled eq false and securityEnabled eq true)');
8383
}
8484

8585
// tslint:disable-next-line:no-bitwise
86-
if (GroupType.MailEnabledSecurity === (groupTypes & GroupType.MailEnabledSecurity)) {
86+
if (GroupType.mailenabledsecurity === (groupTypes & GroupType.mailenabledsecurity)) {
8787
filterGroups.push('(mailEnabled eq true and securityEnabled eq true)');
8888
}
8989

9090
// tslint:disable-next-line:no-bitwise
91-
if (GroupType.Distribution === (groupTypes & GroupType.Distribution)) {
91+
if (GroupType.distribution === (groupTypes & GroupType.distribution)) {
9292
filterGroups.push('(mailEnabled eq true and securityEnabled eq false)');
9393
}
9494

0 commit comments

Comments
 (0)