Skip to content

Commit 62ec9da

Browse files
authored
Removing users from orgs (canada-ca#1267)
* complete remove user from org mutation * impory export new mutation * translations for new mutation
1 parent a7215f4 commit 62ec9da

7 files changed

Lines changed: 2377 additions & 48 deletions

File tree

api-js/src/locale/en/messages.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@
221221
'Successfully removed organization: {0}.': function (a) {
222222
return ['Successfully removed organization: ', a('0'), '.']
223223
},
224+
'Successfully removed user from organization.':
225+
'Successfully removed user from organization.',
224226
'Successfully sent invitation to service, and organization email.':
225227
'Successfully sent invitation to service, and organization email.',
226228
'Successfully two factor authenticated.':
@@ -323,14 +325,12 @@
323325
'Unable to query domains. Please try again.',
324326
'Unable to query organizations. Please try again.':
325327
'Unable to query organizations. Please try again.',
326-
'Unable to query user without a username, please try again.':
327-
'Unable to query user without a username, please try again.',
328-
'Unable to query user, please try again.':
329-
'Unable to query user, please try again.',
330328
'Unable to remove domain. Please try again.':
331329
'Unable to remove domain. Please try again.',
332330
'Unable to remove organization. Please try again.':
333331
'Unable to remove organization. Please try again.',
332+
'Unable to remove user from organization. Please try again.':
333+
'Unable to remove user from organization. Please try again.',
334334
'Unable to reset password. Please try again.':
335335
'Unable to reset password. Please try again.',
336336
'Unable to retrieve {0} for domain: {domain}.': function (a) {

api-js/src/locale/en/messages.po

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ msgstr "Authentication error. Please sign in again."
3030
msgid "Authentication error. Please sign in."
3131
msgstr "Authentication error. Please sign in."
3232

33-
#: src/types/base/index.js:870
33+
#: src/types/base/index.js:866
3434
msgid "Cannot query affiliations on organization without admin permission or higher."
3535
msgstr "Cannot query affiliations on organization without admin permission or higher."
3636

@@ -80,7 +80,7 @@ msgstr "No verified domain with the provided domain could be found."
8080
msgid "Organization has already been verified."
8181
msgstr "Organization has already been verified."
8282

83-
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:43
83+
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:42
8484
#: src/loaders/user-affiliations/load-user-affiliations-by-user-id.js:42
8585
msgid "Passing both `first` and `last` to paginate the `affiliation` is not supported."
8686
msgstr "Passing both `first` and `last` to paginate the `affiliation` is not supported."
@@ -158,18 +158,18 @@ msgstr "Password was successfully updated."
158158
msgid "Passwords do not match."
159159
msgstr "Passwords do not match."
160160

161-
#: src/auth/check-user-is-admin-for-user.js:17
162-
#: src/auth/check-user-is-admin-for-user.js:27
163-
#: src/auth/check-user-is-admin-for-user.js:59
164-
#: src/auth/check-user-is-admin-for-user.js:69
161+
#: src/auth/check-user-is-admin-for-user.js:19
162+
#: src/auth/check-user-is-admin-for-user.js:29
163+
#: src/auth/check-user-is-admin-for-user.js:60
164+
#: src/auth/check-user-is-admin-for-user.js:70
165165
msgid "Permission error, not an admin for this user."
166166
msgstr "Permission error, not an admin for this user."
167167

168168
#: src/mutations/user/update-user-profile.js:91
169169
msgid "Profile successfully updated."
170170
msgstr "Profile successfully updated."
171171

172-
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:66
172+
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:65
173173
#: src/loaders/user-affiliations/load-user-affiliations-by-user-id.js:65
174174
msgid "Requesting `{amount}` records on the `affiliations` exceeds the `{argSet}` limit of 100 records."
175175
msgstr "Requesting `{amount}` records on the `affiliations` exceeds the `{argSet}` limit of 100 records."
@@ -238,6 +238,10 @@ msgstr "Successfully removed domain: {0} from {1}."
238238
msgid "Successfully removed organization: {0}."
239239
msgstr "Successfully removed organization: {0}."
240240

241+
#: src/mutations/user-affiliations/remove-user-from-org.js:118
242+
msgid "Successfully removed user from organization."
243+
msgstr "Successfully removed user from organization."
244+
241245
#: src/mutations/user-affiliations/invite-user-to-org.js:127
242246
msgid "Successfully sent invitation to service, and organization email."
243247
msgstr "Successfully sent invitation to service, and organization email."
@@ -403,7 +407,7 @@ msgstr "Unable to invite user. Please try again."
403407
msgid "Unable to invite yourself to an org. Please try again."
404408
msgstr "Unable to invite yourself to an org. Please try again."
405409

406-
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:147
410+
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:146
407411
#: src/loaders/user-affiliations/load-user-affiliations-by-user-id.js:146
408412
msgid "Unable to load affiliations. Please try again."
409413
msgstr "Unable to load affiliations. Please try again."
@@ -499,7 +503,7 @@ msgstr "Unable to load verified organizations. Please try again."
499503
msgid "Unable to load web summary. Please try again."
500504
msgstr "Unable to load web summary. Please try again."
501505

502-
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:137
506+
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:136
503507
#: src/loaders/user-affiliations/load-user-affiliations-by-user-id.js:136
504508
msgid "Unable to query affiliations. Please try again."
505509
msgstr "Unable to query affiliations. Please try again."
@@ -512,14 +516,6 @@ msgstr "Unable to query domains. Please try again."
512516
msgid "Unable to query organizations. Please try again."
513517
msgstr "Unable to query organizations. Please try again."
514518

515-
#: src/queries/user/find-user-by-username.js:34
516-
msgid "Unable to query user without a username, please try again."
517-
msgstr "Unable to query user without a username, please try again."
518-
519-
#: src/queries/user/find-user-by-username.js:50
520-
msgid "Unable to query user, please try again."
521-
msgstr "Unable to query user, please try again."
522-
523519
#: src/mutations/domain/remove-domain.js:58
524520
#: src/mutations/domain/remove-domain.js:69
525521
#: src/mutations/domain/remove-domain.js:80
@@ -541,6 +537,14 @@ msgstr "Unable to remove domain. Please try again."
541537
msgid "Unable to remove organization. Please try again."
542538
msgstr "Unable to remove organization. Please try again."
543539

540+
#: src/mutations/user-affiliations/remove-user-from-org.js:52
541+
#: src/mutations/user-affiliations/remove-user-from-org.js:63
542+
#: src/mutations/user-affiliations/remove-user-from-org.js:74
543+
#: src/mutations/user-affiliations/remove-user-from-org.js:102
544+
#: src/mutations/user-affiliations/remove-user-from-org.js:113
545+
msgid "Unable to remove user from organization. Please try again."
546+
msgstr "Unable to remove user from organization. Please try again."
547+
544548
#: src/mutations/user/reset-password.js:60
545549
#: src/mutations/user/reset-password.js:70
546550
#: src/mutations/user/reset-password.js:78
@@ -677,7 +681,7 @@ msgstr "Unable to verify if user is an admin, please try again."
677681
msgid "Unable to verify organization. Please try again."
678682
msgstr "Unable to verify organization. Please try again."
679683

680-
#: src/queries/user/find-user-by-username.js:60
684+
#: src/queries/user/find-user-by-username.js:40
681685
msgid "User could not be queried."
682686
msgstr "User could not be queried."
683687

@@ -697,7 +701,7 @@ msgstr "We've sent you a text message with an authentication code to sign into P
697701
msgid "We've sent you an email with an authentication code to sign into Pulse."
698702
msgstr "We've sent you an email with an authentication code to sign into Pulse."
699703

700-
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:34
704+
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:33
701705
#: src/loaders/user-affiliations/load-user-affiliations-by-user-id.js:33
702706
msgid "You must provide a `first` or `last` value to properly paginate the `affiliation`."
703707
msgstr "You must provide a `first` or `last` value to properly paginate the `affiliation`."
@@ -767,7 +771,7 @@ msgstr "You must provide a `first` or `last` value to properly paginate the `ver
767771
#: src/loaders/guidance-tags/load-ssl-guidance-tags-connections.js:77
768772
#: src/loaders/organizations/load-organization-connections-by-domain-id.js:81
769773
#: src/loaders/organizations/load-organization-connections-by-user-id.js:81
770-
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:81
774+
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:80
771775
#: src/loaders/user-affiliations/load-user-affiliations-by-user-id.js:80
772776
#: src/loaders/verified-domains/load-verified-domain-connections-by-organization-id.js:79
773777
#: src/loaders/verified-domains/load-verified-domain-connections.js:80
@@ -778,7 +782,7 @@ msgstr "You must provide a `first` or `last` value to properly paginate the `ver
778782
msgid "`{argSet}` must be of type `number` not `{typeSet}`."
779783
msgstr "`{argSet}` must be of type `number` not `{typeSet}`."
780784

781-
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:55
785+
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:54
782786
#: src/loaders/user-affiliations/load-user-affiliations-by-user-id.js:54
783787
msgid "`{argSet}` on the `affiliations` cannot be less than zero."
784788
msgstr "`{argSet}` on the `affiliations` cannot be less than zero."

api-js/src/locale/fr/messages.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
'todo',
8484
'Successfully removed domain: {0} from {1}.': 'todo',
8585
'Successfully removed organization: {0}.': 'todo',
86+
'Successfully removed user from organization.': 'todo',
8687
'Successfully sent invitation to service, and organization email.': 'todo',
8788
'Successfully two factor authenticated.': 'todo',
8889
'Successfully verified account.': 'todo',
@@ -136,10 +137,9 @@
136137
'Unable to query affiliations. Please try again.': 'todo',
137138
'Unable to query domains. Please try again.': 'todo',
138139
'Unable to query organizations. Please try again.': 'todo',
139-
'Unable to query user without a username, please try again.': 'todo',
140-
'Unable to query user, please try again.': 'todo',
141140
'Unable to remove domain. Please try again.': 'todo',
142141
'Unable to remove organization. Please try again.': 'todo',
142+
'Unable to remove user from organization. Please try again.': 'todo',
143143
'Unable to reset password. Please try again.': 'todo',
144144
'Unable to retrieve {0} for domain: {domain}.': 'todo',
145145
'Unable to send TFA code, please try again.': 'todo',

api-js/src/locale/fr/messages.po

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ msgstr "todo"
3030
msgid "Authentication error. Please sign in."
3131
msgstr "todo"
3232

33-
#: src/types/base/index.js:870
33+
#: src/types/base/index.js:866
3434
msgid "Cannot query affiliations on organization without admin permission or higher."
3535
msgstr "todo"
3636

@@ -80,7 +80,7 @@ msgstr "todo"
8080
msgid "Organization has already been verified."
8181
msgstr "todo"
8282

83-
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:43
83+
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:42
8484
#: src/loaders/user-affiliations/load-user-affiliations-by-user-id.js:42
8585
msgid "Passing both `first` and `last` to paginate the `affiliation` is not supported."
8686
msgstr "todo"
@@ -158,18 +158,18 @@ msgstr "todo"
158158
msgid "Passwords do not match."
159159
msgstr "todo"
160160

161-
#: src/auth/check-user-is-admin-for-user.js:17
162-
#: src/auth/check-user-is-admin-for-user.js:27
163-
#: src/auth/check-user-is-admin-for-user.js:59
164-
#: src/auth/check-user-is-admin-for-user.js:69
161+
#: src/auth/check-user-is-admin-for-user.js:19
162+
#: src/auth/check-user-is-admin-for-user.js:29
163+
#: src/auth/check-user-is-admin-for-user.js:60
164+
#: src/auth/check-user-is-admin-for-user.js:70
165165
msgid "Permission error, not an admin for this user."
166166
msgstr "todo"
167167

168168
#: src/mutations/user/update-user-profile.js:91
169169
msgid "Profile successfully updated."
170170
msgstr "todo"
171171

172-
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:66
172+
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:65
173173
#: src/loaders/user-affiliations/load-user-affiliations-by-user-id.js:65
174174
msgid "Requesting `{amount}` records on the `affiliations` exceeds the `{argSet}` limit of 100 records."
175175
msgstr "todo"
@@ -238,6 +238,10 @@ msgstr "todo"
238238
msgid "Successfully removed organization: {0}."
239239
msgstr "todo"
240240

241+
#: src/mutations/user-affiliations/remove-user-from-org.js:118
242+
msgid "Successfully removed user from organization."
243+
msgstr "todo"
244+
241245
#: src/mutations/user-affiliations/invite-user-to-org.js:127
242246
msgid "Successfully sent invitation to service, and organization email."
243247
msgstr "todo"
@@ -403,7 +407,7 @@ msgstr "todo"
403407
msgid "Unable to invite yourself to an org. Please try again."
404408
msgstr "todo"
405409

406-
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:147
410+
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:146
407411
#: src/loaders/user-affiliations/load-user-affiliations-by-user-id.js:146
408412
msgid "Unable to load affiliations. Please try again."
409413
msgstr "todo"
@@ -499,7 +503,7 @@ msgstr "todo"
499503
msgid "Unable to load web summary. Please try again."
500504
msgstr "todo"
501505

502-
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:137
506+
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:136
503507
#: src/loaders/user-affiliations/load-user-affiliations-by-user-id.js:136
504508
msgid "Unable to query affiliations. Please try again."
505509
msgstr "todo"
@@ -512,14 +516,6 @@ msgstr "todo"
512516
msgid "Unable to query organizations. Please try again."
513517
msgstr "todo"
514518

515-
#: src/queries/user/find-user-by-username.js:34
516-
msgid "Unable to query user without a username, please try again."
517-
msgstr "todo"
518-
519-
#: src/queries/user/find-user-by-username.js:50
520-
msgid "Unable to query user, please try again."
521-
msgstr "todo"
522-
523519
#: src/mutations/domain/remove-domain.js:58
524520
#: src/mutations/domain/remove-domain.js:69
525521
#: src/mutations/domain/remove-domain.js:80
@@ -541,6 +537,14 @@ msgstr "todo"
541537
msgid "Unable to remove organization. Please try again."
542538
msgstr "todo"
543539

540+
#: src/mutations/user-affiliations/remove-user-from-org.js:52
541+
#: src/mutations/user-affiliations/remove-user-from-org.js:63
542+
#: src/mutations/user-affiliations/remove-user-from-org.js:74
543+
#: src/mutations/user-affiliations/remove-user-from-org.js:102
544+
#: src/mutations/user-affiliations/remove-user-from-org.js:113
545+
msgid "Unable to remove user from organization. Please try again."
546+
msgstr "todo"
547+
544548
#: src/mutations/user/reset-password.js:60
545549
#: src/mutations/user/reset-password.js:70
546550
#: src/mutations/user/reset-password.js:78
@@ -677,7 +681,7 @@ msgstr "todo"
677681
msgid "Unable to verify organization. Please try again."
678682
msgstr "todo"
679683

680-
#: src/queries/user/find-user-by-username.js:60
684+
#: src/queries/user/find-user-by-username.js:40
681685
msgid "User could not be queried."
682686
msgstr "todo"
683687

@@ -697,7 +701,7 @@ msgstr "todo"
697701
msgid "We've sent you an email with an authentication code to sign into Pulse."
698702
msgstr "todo"
699703

700-
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:34
704+
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:33
701705
#: src/loaders/user-affiliations/load-user-affiliations-by-user-id.js:33
702706
msgid "You must provide a `first` or `last` value to properly paginate the `affiliation`."
703707
msgstr "todo"
@@ -767,7 +771,7 @@ msgstr "todo"
767771
#: src/loaders/guidance-tags/load-ssl-guidance-tags-connections.js:77
768772
#: src/loaders/organizations/load-organization-connections-by-domain-id.js:81
769773
#: src/loaders/organizations/load-organization-connections-by-user-id.js:81
770-
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:81
774+
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:80
771775
#: src/loaders/user-affiliations/load-user-affiliations-by-user-id.js:80
772776
#: src/loaders/verified-domains/load-verified-domain-connections-by-organization-id.js:79
773777
#: src/loaders/verified-domains/load-verified-domain-connections.js:80
@@ -778,7 +782,7 @@ msgstr "todo"
778782
msgid "`{argSet}` must be of type `number` not `{typeSet}`."
779783
msgstr "todo"
780784

781-
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:55
785+
#: src/loaders/user-affiliations/load-user-affiliations-by-org-id.js:54
782786
#: src/loaders/user-affiliations/load-user-affiliations-by-user-id.js:54
783787
msgid "`{argSet}` on the `affiliations` cannot be less than zero."
784788
msgstr "todo"

0 commit comments

Comments
 (0)