Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archive and hide domains by org #4219

Merged
merged 22 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
cb80dab
add archived and hidden values in create/update domain
lcampbell2 Dec 14, 2022
82df8d1
exclude archived and hidden domains from summaries
lcampbell2 Dec 15, 2022
7d36a71
exclude archived domains from scans
lcampbell2 Dec 15, 2022
847c712
permission required to load hidden and archived domains
lcampbell2 Dec 16, 2022
d45d1ee
add archived and hidden fields to queries and mutations
lcampbell2 Dec 16, 2022
0e49bfc
add mutations and values to admin page
lcampbell2 Dec 16, 2022
02edb18
add hidden and archived tags to domain cards
lcampbell2 Dec 16, 2022
e25e1b9
fix bug when creating and updating hidden values
lcampbell2 Dec 19, 2022
e2faf2f
add log for archiving domain
lcampbell2 Dec 19, 2022
d7e980f
update tests
lcampbell2 Dec 19, 2022
8fcc76d
add frontend translations
lcampbell2 Dec 19, 2022
cabe3a5
api translations
lcampbell2 Dec 19, 2022
9f1abe9
put hide and archive toggles behind AB testing
lcampbell2 Dec 20, 2022
0d2e29e
fix api tests
lcampbell2 Dec 20, 2022
b0c5c67
remove commented code
lcampbell2 Dec 20, 2022
3524c93
add 24 hour disclaimer to hide domain switch
lcampbell2 Dec 21, 2022
e48fa95
allow archived domains to be scanned manually and on creation
lcampbell2 Dec 21, 2022
49370a8
Merge branch 'master' into archive-domains-by-org
lcampbell2 Feb 9, 2023
9dde67d
Merge branch 'master' into archive-domains-by-org
lcampbell2 Mar 2, 2023
04e2500
update archive tooltip
lcampbell2 Mar 3, 2023
5a82fb5
fix bfs option
lcampbell2 Mar 3, 2023
fc6fe03
add number of affected orgs to archive toggle
lcampbell2 Mar 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions api/src/domain/loaders/__tests__/load-domain-conn-org-id.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ describe('given the load domain connection using org id function', () => {
spf: 'pass',
ssl: 'pass',
},
archived: false,
})
await collections.claims.save({
_from: org._id,
_to: domain._id,
tags: [],
hidden: false,
})
domainTwo = await collections.domains.save({
domain: 'test.domain.canada.ca',
Expand All @@ -115,11 +117,13 @@ describe('given the load domain connection using org id function', () => {
spf: 'fail',
ssl: 'fail',
},
archived: false,
})
await collections.claims.save({
_from: org._id,
_to: domainTwo._id,
tags: [],
hidden: false,
})
})
afterEach(async () => {
Expand Down Expand Up @@ -163,6 +167,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[1],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -213,6 +218,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[0],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -262,6 +268,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[0],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -311,6 +318,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[1],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -363,6 +371,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomain,
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -421,6 +430,7 @@ describe('given the load domain connection using org id function', () => {
_from: org._id,
_to: domainThree._id,
tags: [],
hidden: false,
})
await collections.ownership.save({
_from: org._id,
Expand Down Expand Up @@ -460,6 +470,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[0],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -508,20 +519,23 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[0],
claimTags: [],
hidden: false,
},
},
{
cursor: toGlobalId('domain', expectedDomains[1]._key),
node: {
...expectedDomains[1],
claimTags: [],
hidden: false,
},
},
{
cursor: toGlobalId('domain', expectedDomains[2]._key),
node: {
...expectedDomains[2],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -579,6 +593,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[0],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -633,6 +648,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[1],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -689,6 +705,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[0],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -743,6 +760,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[1],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -799,6 +817,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[0],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -853,6 +872,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[1],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -909,6 +929,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[0],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -963,6 +984,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[1],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -1019,6 +1041,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[0],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -1073,6 +1096,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[1],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -1131,6 +1155,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[1],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -1185,6 +1210,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[0],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -1241,6 +1267,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[1],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -1295,6 +1322,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[0],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -1351,6 +1379,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[1],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -1405,6 +1434,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[0],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -1461,6 +1491,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[1],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -1515,6 +1546,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[0],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -1571,6 +1603,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[1],
claimTags: [],
hidden: false,
},
},
],
Expand Down Expand Up @@ -1625,6 +1658,7 @@ describe('given the load domain connection using org id function', () => {
node: {
...expectedDomains[0],
claimTags: [],
hidden: false,
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ describe('given the load domain connections by user id function', () => {
describe('given a successful load', () => {
beforeAll(async () => {
;({ query, drop, truncate, collections } = await ensure({
variables: {
dbname: dbNameFromFile(__filename),
username: 'root',
rootPassword: rootPass,
password: rootPass,
url,
},

schema: dbschema,
}))
variables: {
dbname: dbNameFromFile(__filename),
username: 'root',
rootPassword: rootPass,
password: rootPass,
url,
},

schema: dbschema,
}))
})
beforeEach(async () => {
user = await collections.users.save({
Expand Down
Loading