You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-03 07:22:32 +03:00
27 lines
672 B
Rego
27 lines
672 B
Rego
package email
|
|
|
|
test_allow_all_domains {
|
|
allow with input.email as "hello@staging.element.io"
|
|
}
|
|
|
|
test_allowed_domain {
|
|
allow with input.email as "hello@staging.element.io"
|
|
with data.allowed_domains as ["*.element.io"]
|
|
}
|
|
|
|
test_not_allowed_domain {
|
|
not allow with input.email as "hello@staging.element.io"
|
|
with data.allowed_domains as ["example.com"]
|
|
}
|
|
|
|
test_banned_domain {
|
|
not allow with input.email as "hello@staging.element.io"
|
|
with data.banned_domains as ["*.element.io"]
|
|
}
|
|
|
|
test_banned_subdomain {
|
|
not allow with input.email as "hello@staging.element.io"
|
|
with data.allowed_domains as ["*.element.io"]
|
|
with data.banned_domains as ["staging.element.io"]
|
|
}
|