Skip to content

Commit 8f7b9cb

Browse files
Fe fix admin afilliations (canada-ca#2330)
* added new query * create new isSuperAdmin query * update translations * update mocked schema * ADMIN_AFFILIATIONS query implemented on AdminPage.js * Super admins have increased privileges Co-authored-by: nsdeschenes <nsdeschenes@outlook.com>
1 parent 00e06ee commit 8f7b9cb

10 files changed

Lines changed: 482 additions & 47 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,8 @@
490490
'Unable to verify account. Please request a new email.',
491491
'Unable to verify account. Please try again.':
492492
'Unable to verify account. Please try again.',
493+
'Unable to verify if user is a super admin, please try again.':
494+
'Unable to verify if user is a super admin, please try again.',
493495
'Unable to verify if user is an admin, please try again.':
494496
'Unable to verify if user is an admin, please try again.',
495497
'Unable to verify organization. Please try again.':

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

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ msgstr "Authentication error. Please sign in again."
2222
msgid "Authentication error. Please sign in."
2323
msgstr "Authentication error. Please sign in."
2424

25-
#: src/organization/objects/organization.js:138
25+
#: src/organization/objects/organization.js:142
2626
msgid "Cannot query affiliations on organization without admin permission or higher."
2727
msgstr "Cannot query affiliations on organization without admin permission or higher."
2828

@@ -151,8 +151,8 @@ msgstr "Passing both `first` and `last` to paginate the `VerifiedDomain` connect
151151
msgid "Passing both `first` and `last` to paginate the `VerifiedOrganization` connection is not supported."
152152
msgstr "Passing both `first` and `last` to paginate the `VerifiedOrganization` connection is not supported."
153153

154-
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:83
155-
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:174
154+
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:80
155+
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:170
156156
msgid "Passing both `first` and `last` to paginate the `affiliation` is not supported."
157157
msgstr "Passing both `first` and `last` to paginate the `affiliation` is not supported."
158158

@@ -312,8 +312,8 @@ msgstr "Requesting `{amount}` records on the `VerifiedDomain` connection exceeds
312312
msgid "Requesting `{amount}` records on the `VerifiedOrganization` connection exceeds the `{argSet}` limit of 100 records."
313313
msgstr "Requesting `{amount}` records on the `VerifiedOrganization` connection exceeds the `{argSet}` limit of 100 records."
314314

315-
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:106
316-
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:197
315+
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:103
316+
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:193
317317
msgid "Requesting `{amount}` records on the `affiliations` exceeds the `{argSet}` limit of 100 records."
318318
msgstr "Requesting `{amount}` records on the `affiliations` exceeds the `{argSet}` limit of 100 records."
319319

@@ -627,8 +627,8 @@ msgstr "Unable to load SSL guidance tag(s). Please try again."
627627
msgid "Unable to load SSL scan(s). Please try again."
628628
msgstr "Unable to load SSL scan(s). Please try again."
629629

630-
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:234
631-
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:416
630+
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:266
631+
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:449
632632
msgid "Unable to load affiliation(s). Please try again."
633633
msgstr "Unable to load affiliation(s). Please try again."
634634

@@ -700,8 +700,8 @@ msgstr "Unable to load verified organization(s). Please try again."
700700
msgid "Unable to load web summary. Please try again."
701701
msgstr "Unable to load web summary. Please try again."
702702

703-
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:223
704-
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:405
703+
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:254
704+
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:437
705705
msgid "Unable to query affiliation(s). Please try again."
706706
msgstr "Unable to query affiliation(s). Please try again."
707707

@@ -921,6 +921,10 @@ msgstr "Unable to verify account. Please request a new email."
921921
msgid "Unable to verify account. Please try again."
922922
msgstr "Unable to verify account. Please try again."
923923

924+
#: src/user/queries/is-user-super-admin.js:23
925+
msgid "Unable to verify if user is a super admin, please try again."
926+
msgstr "Unable to verify if user is a super admin, please try again."
927+
924928
#: src/user/queries/is-user-admin.js:23
925929
msgid "Unable to verify if user is an admin, please try again."
926930
msgstr "Unable to verify if user is an admin, please try again."
@@ -1014,8 +1018,8 @@ msgstr "You must provide a `first` or `last` value to properly paginate the `Ver
10141018
msgid "You must provide a `first` or `last` value to properly paginate the `VerifiedOrganization` connection."
10151019
msgstr "You must provide a `first` or `last` value to properly paginate the `VerifiedOrganization` connection."
10161020

1017-
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:74
1018-
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:165
1021+
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:71
1022+
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:161
10191023
msgid "You must provide a `first` or `last` value to properly paginate the `affiliation`."
10201024
msgstr "You must provide a `first` or `last` value to properly paginate the `affiliation`."
10211025

@@ -1036,8 +1040,8 @@ msgstr "You must provide a `period` value to access the `dmarcSummaries` connect
10361040
msgid "You must provide a `year` value to access the `dmarcSummaries` connection."
10371041
msgstr "You must provide a `year` value to access the `dmarcSummaries` connection."
10381042

1039-
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:121
1040-
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:212
1043+
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:118
1044+
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:208
10411045
#: src/dmarc-summaries/loaders/load-dkim-failure-connections-by-sum-id.js:86
10421046
#: src/dmarc-summaries/loaders/load-dmarc-failure-connections-by-sum-id.js:86
10431047
#: src/dmarc-summaries/loaders/load-dmarc-sum-connections-by-user-id.js:229
@@ -1130,8 +1134,8 @@ msgstr "`{argSet}` on the `VerifiedDomain` connection cannot be less than zero."
11301134
msgid "`{argSet}` on the `VerifiedOrganization` connection cannot be less than zero."
11311135
msgstr "`{argSet}` on the `VerifiedOrganization` connection cannot be less than zero."
11321136

1133-
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:95
1134-
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:186
1137+
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:92
1138+
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:182
11351139
msgid "`{argSet}` on the `affiliations` cannot be less than zero."
11361140
msgstr "`{argSet}` on the `affiliations` cannot be less than zero."
11371141

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@
255255
'Unable to update your own role.': 'todo',
256256
'Unable to verify account. Please request a new email.': 'todo',
257257
'Unable to verify account. Please try again.': 'todo',
258+
'Unable to verify if user is a super admin, please try again.': 'todo',
258259
'Unable to verify if user is an admin, please try again.': 'todo',
259260
'Unable to verify organization. Please try again.': 'todo',
260261
'Unable to verify unknown organization.': 'todo',

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

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ msgstr "todo"
2222
msgid "Authentication error. Please sign in."
2323
msgstr "todo"
2424

25-
#: src/organization/objects/organization.js:138
25+
#: src/organization/objects/organization.js:142
2626
msgid "Cannot query affiliations on organization without admin permission or higher."
2727
msgstr "todo"
2828

@@ -151,8 +151,8 @@ msgstr "todo"
151151
msgid "Passing both `first` and `last` to paginate the `VerifiedOrganization` connection is not supported."
152152
msgstr "todo"
153153

154-
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:83
155-
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:174
154+
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:80
155+
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:170
156156
msgid "Passing both `first` and `last` to paginate the `affiliation` is not supported."
157157
msgstr "todo"
158158

@@ -312,8 +312,8 @@ msgstr "todo"
312312
msgid "Requesting `{amount}` records on the `VerifiedOrganization` connection exceeds the `{argSet}` limit of 100 records."
313313
msgstr "todo"
314314

315-
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:106
316-
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:197
315+
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:103
316+
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:193
317317
msgid "Requesting `{amount}` records on the `affiliations` exceeds the `{argSet}` limit of 100 records."
318318
msgstr "todo"
319319

@@ -627,8 +627,8 @@ msgstr "todo"
627627
msgid "Unable to load SSL scan(s). Please try again."
628628
msgstr "todo"
629629

630-
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:234
631-
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:416
630+
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:266
631+
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:449
632632
msgid "Unable to load affiliation(s). Please try again."
633633
msgstr "todo"
634634

@@ -700,8 +700,8 @@ msgstr "todo"
700700
msgid "Unable to load web summary. Please try again."
701701
msgstr "todo"
702702

703-
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:223
704-
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:405
703+
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:254
704+
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:437
705705
msgid "Unable to query affiliation(s). Please try again."
706706
msgstr "todo"
707707

@@ -921,6 +921,10 @@ msgstr "todo"
921921
msgid "Unable to verify account. Please try again."
922922
msgstr "todo"
923923

924+
#: src/user/queries/is-user-super-admin.js:23
925+
msgid "Unable to verify if user is a super admin, please try again."
926+
msgstr "todo"
927+
924928
#: src/user/queries/is-user-admin.js:23
925929
msgid "Unable to verify if user is an admin, please try again."
926930
msgstr "todo"
@@ -1014,8 +1018,8 @@ msgstr "todo"
10141018
msgid "You must provide a `first` or `last` value to properly paginate the `VerifiedOrganization` connection."
10151019
msgstr "todo"
10161020

1017-
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:74
1018-
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:165
1021+
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:71
1022+
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:161
10191023
msgid "You must provide a `first` or `last` value to properly paginate the `affiliation`."
10201024
msgstr "todo"
10211025

@@ -1036,8 +1040,8 @@ msgstr "todo"
10361040
msgid "You must provide a `year` value to access the `dmarcSummaries` connection."
10371041
msgstr "todo"
10381042

1039-
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:121
1040-
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:212
1043+
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:118
1044+
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:208
10411045
#: src/dmarc-summaries/loaders/load-dkim-failure-connections-by-sum-id.js:86
10421046
#: src/dmarc-summaries/loaders/load-dmarc-failure-connections-by-sum-id.js:86
10431047
#: src/dmarc-summaries/loaders/load-dmarc-sum-connections-by-user-id.js:229
@@ -1130,8 +1134,8 @@ msgstr "todo"
11301134
msgid "`{argSet}` on the `VerifiedOrganization` connection cannot be less than zero."
11311135
msgstr "todo"
11321136

1133-
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:95
1134-
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:186
1137+
#: src/affiliation/loaders/load-affiliation-connections-by-org-id.js:92
1138+
#: src/affiliation/loaders/load-affiliation-connections-by-user-id.js:182
11351139
msgid "`{argSet}` on the `affiliations` cannot be less than zero."
11361140
msgstr "todo"
11371141

0 commit comments

Comments
 (0)