109898688: All codes are valid until one code is used, then they are all marked used.

Fixed the is_active() method on the Users model, if the user was pending they would come back as active, allowing a user to sign in before being active.
There is still a problem with the validate_sms_code and validate_email_code method.
This commit is contained in:
Rebecca Law
2015-12-16 12:20:25 +00:00
parent bd8bb3c926
commit 64812c1614
18 changed files with 259 additions and 203 deletions

View File

@@ -13,11 +13,11 @@ def add_code(user_id, code, code_type):
db.session.add(code) db.session.add(code)
db.session.commit() db.session.commit()
return code.id
def get_code(user_id, code_type): def get_codes(user_id, code_type):
verify_code = VerifyCodes.query.filter_by(user_id=user_id, code_type=code_type, code_used=False).first() return VerifyCodes.query.filter_by(user_id=user_id, code_type=code_type, code_used=False).all()
return verify_code
def get_code_by_code(user_id, code, code_type): def get_code_by_code(user_id, code, code_type):
@@ -32,9 +32,10 @@ def use_code(id):
def use_code_for_user_and_type(user_id, code_type): def use_code_for_user_and_type(user_id, code_type):
verify_code = VerifyCodes.query.filter_by(user_id=user_id, code_type=code_type).first() codes = VerifyCodes.query.filter_by(user_id=user_id, code_type=code_type, code_used=False).all()
verify_code.code_used = True for verify_code in codes:
db.session.add(verify_code) verify_code.code_used = True
db.session.add(verify_code)
db.session.commit() db.session.commit()

View File

@@ -49,8 +49,10 @@ class TwoFactorForm(Form):
Regexp(regex=verify_code, message='Code must be 5 digits')]) Regexp(regex=verify_code, message='Code must be 5 digits')])
def validate_sms_code(self, a): def validate_sms_code(self, a):
code = verify_codes_dao.get_code(session['user_id'], 'sms') codes = verify_codes_dao.get_codes(session['user_id'], 'sms')
validate_code(self.sms_code, code) for code in codes:
if validate_code(self.sms_code, code):
return True
class VerifyForm(Form): class VerifyForm(Form):
@@ -62,12 +64,16 @@ class VerifyForm(Form):
Regexp(regex=verify_code, message='Code must be 5 digits')]) Regexp(regex=verify_code, message='Code must be 5 digits')])
def validate_email_code(self, a): def validate_email_code(self, a):
code = verify_codes_dao.get_code(session['user_id'], 'email') codes = verify_codes_dao.get_codes(session['user_id'], 'email')
validate_code(self.email_code, code) for code in codes:
if validate_code(self.email_code, code):
return True
def validate_sms_code(self, a): def validate_sms_code(self, a):
code = verify_codes_dao.get_code(session['user_id'], 'sms') codes = verify_codes_dao.get_codes(session['user_id'], 'sms')
validate_code(self.sms_code, code) for code in codes:
if validate_code(self.sms_code, code):
return True
def validate_code(field, code): def validate_code(field, code):

View File

@@ -19,7 +19,6 @@ def check_and_resend_email_code():
if form.validate_on_submit(): if form.validate_on_submit():
user = users_dao.get_user_by_id(session['user_id']) user = users_dao.get_user_by_id(session['user_id'])
users_dao.update_email_address(id=user.id, email_address=form.email_address.data) users_dao.update_email_address(id=user.id, email_address=form.email_address.data)
verify_codes_dao.use_code_for_user_and_type(user_id=user.id, code_type='email')
send_email_code(user_id=user.id, email=user.email_address) send_email_code(user_id=user.id, email=user.email_address)
return redirect('/verify') return redirect('/verify')
return jsonify(form.errors), 400 return jsonify(form.errors), 400
@@ -37,7 +36,6 @@ def check_and_resend_text_code():
if form.validate_on_submit(): if form.validate_on_submit():
user = users_dao.get_user_by_id(session['user_id']) user = users_dao.get_user_by_id(session['user_id'])
users_dao.update_mobile_number(id=user.id, mobile_number=form.mobile_number.data) users_dao.update_mobile_number(id=user.id, mobile_number=form.mobile_number.data)
verify_codes_dao.use_code_for_user_and_type(user_id=user.id, code_type='sms')
send_sms_code(user_id=user.id, mobile_number=user.mobile_number) send_sms_code(user_id=user.id, mobile_number=user.mobile_number)
return redirect('/verify') return redirect('/verify')
return jsonify(form.errors), 400 return jsonify(form.errors), 400

View File

@@ -60,7 +60,7 @@ class User(db.Model):
return True return True
def is_active(self): def is_active(self):
if self.state == 'inactive': if self.state != 'active':
return False return False
else: else:
return True return True

View File

@@ -28,7 +28,7 @@
@-o-viewport { @-o-viewport {
width: device-width; width: device-width;
} }
/* line 46, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_shims.scss */ /* line 46, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_shims.scss */
#global-header .header-wrapper:after, #global-header .header-wrapper .header-global:after, #global-header .header-wrapper .header-global .header-logo:after, #global-header .header-proposition #proposition-link:after, #global-header .header-wrapper:after, #global-header .header-wrapper .header-global:after, #global-header .header-wrapper .header-global .header-logo:after, #global-header .header-proposition #proposition-link:after,
#global-header .header-proposition #proposition-links:after, #footer .footer-wrapper:after, #footer .footer-meta:after { #global-header .header-proposition #proposition-links:after, #footer .footer-wrapper:after, #footer .footer-meta:after {
content: ""; content: "";
@@ -36,19 +36,19 @@
clear: both; clear: both;
} }
/* line 18, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_grid_layout.scss */ /* line 18, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_grid_layout.scss */
#global-header-bar, #global-cookie-message p { #global-header-bar, #global-cookie-message p {
max-width: 960px; max-width: 960px;
margin: 0 15px; margin: 0 15px;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 18, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_grid_layout.scss */ /* line 18, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_grid_layout.scss */
#global-header-bar, #global-cookie-message p { #global-header-bar, #global-cookie-message p {
margin: 0 30px; margin: 0 30px;
} }
} }
@media (min-width: 1020px) { @media (min-width: 1020px) {
/* line 18, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_grid_layout.scss */ /* line 18, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_grid_layout.scss */
#global-header-bar, #global-cookie-message p { #global-header-bar, #global-cookie-message p {
margin: 0 auto; margin: 0 auto;
} }
@@ -60,7 +60,7 @@
@-o-viewport { @-o-viewport {
width: device-width; width: device-width;
} }
/* line 46, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_shims.scss */ /* line 46, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_shims.scss */
#global-header .header-wrapper:after, #global-header .header-wrapper .header-global:after, #global-header .header-wrapper .header-global .header-logo:after, #global-header .header-proposition #proposition-link:after, #global-header .header-wrapper:after, #global-header .header-wrapper .header-global:after, #global-header .header-wrapper .header-global .header-logo:after, #global-header .header-proposition #proposition-link:after,
#global-header .header-proposition #proposition-links:after, #footer .footer-wrapper:after, #footer .footer-meta:after { #global-header .header-proposition #proposition-links:after, #footer .footer-wrapper:after, #footer .footer-meta:after {
content: ""; content: "";
@@ -76,24 +76,24 @@
} }
/* local styleguide includes */ /* local styleguide includes */
/* Old depricated greys, new things should use the toolkit greys */ /* Old depricated greys, new things should use the toolkit greys */
/* line 1, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 1, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
html, body, button, input, table, td, th { html, body, button, input, table, td, th {
font-family: "nta", Arial, sans-serif; font-family: "nta", Arial, sans-serif;
} }
/* line 4, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 4, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
html, body, div, h1, h2, h3, h4, h5, h6, article, aside, footer, header, hgroup, nav, section { html, body, div, h1, h2, h3, h4, h5, h6, article, aside, footer, header, hgroup, nav, section {
margin: 0; margin: 0;
padding: 0; padding: 0;
vertical-align: baseline; vertical-align: baseline;
} }
/* line 11, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 11, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
main { main {
display: block; display: block;
} }
/* line 16, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 16, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
.group:before, .group:before,
.group:after { .group:after {
content: "\0020"; content: "\0020";
@@ -102,23 +102,23 @@ main {
overflow: hidden; overflow: hidden;
} }
/* line 24, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 24, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
.group:after { .group:after {
clear: both; clear: both;
} }
/* line 27, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 27, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
.group { .group {
zoom: 1; zoom: 1;
} }
/* line 32, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 32, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
.content-fixed { .content-fixed {
top: 0; top: 0;
position: fixed; position: fixed;
} }
/* line 36, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 36, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
.shim { .shim {
display: block; display: block;
} }
@@ -127,7 +127,7 @@ main {
* 1. Prevents iOS text size adjust after orientation change, without disabling * 1. Prevents iOS text size adjust after orientation change, without disabling
* user zoom. * user zoom.
*/ */
/* line 44, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 44, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
html { html {
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
/* 1 */ /* 1 */
@@ -139,12 +139,12 @@ html {
/* /*
Force the scrollbar to always display in IE10/11 Force the scrollbar to always display in IE10/11
*/ */
/* line 54, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 54, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
html { html {
-ms-overflow-style: scrollbar; -ms-overflow-style: scrollbar;
} }
/* line 58, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 58, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
body { body {
background: #fff; background: #fff;
color: #0b0c0c; color: #0b0c0c;
@@ -154,86 +154,86 @@ body {
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
/* line 67, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 67, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
ol, ul, nav ol, nav ul { ol, ul, nav ol, nav ul {
list-style: inherit; list-style: inherit;
} }
/* line 71, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 71, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
fieldset { fieldset {
border: none; border: none;
padding: 0; padding: 0;
} }
/* line 76, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 76, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
a:link { a:link {
color: #005ea5; color: #005ea5;
} }
/* line 80, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 80, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
a:visited { a:visited {
color: #4c2c92; color: #4c2c92;
} }
/* line 84, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 84, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
a:hover { a:hover {
color: #2e8aca; color: #2e8aca;
} }
/* line 88, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 88, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
a:active { a:active {
color: #2e8aca; color: #2e8aca;
} }
/* line 290, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */ /* line 290, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */
a[rel="external"]:after { a[rel="external"]:after {
background-image: image-url("external-links/external-link.png"); background-image: image-url("external-links/external-link.png");
background-repeat: no-repeat; background-repeat: no-repeat;
} }
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 20 / 10), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) { @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 20 / 10), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
/* line 290, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */ /* line 290, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */
a[rel="external"]:after { a[rel="external"]:after {
background-image: image-url("external-links/external-link-24x24.png"); background-image: image-url("external-links/external-link-24x24.png");
background-size: 12px 400px; background-size: 12px 400px;
} }
} }
/* line 231, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */ /* line 231, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */
a[rel="external"]:after { a[rel="external"]:after {
content: "    "; content: "    ";
background-position: right 6px; background-position: right 6px;
} }
/* line 240, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */ /* line 240, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */
a[rel="external"]:hover:after { a[rel="external"]:hover:after {
background-position: right -382px; background-position: right -382px;
} }
@media (max-width: 640px) { @media (max-width: 640px) {
/* line 231, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */ /* line 231, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */
a[rel="external"]:after { a[rel="external"]:after {
content: "     "; content: "     ";
background-position: right 3px; background-position: right 3px;
} }
/* line 240, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */ /* line 240, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */
a[rel="external"]:hover:after { a[rel="external"]:hover:after {
background-position: right -385px; background-position: right -385px;
} }
} }
/* line 231, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */ /* line 231, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */
.external-link:after { .external-link:after {
content: "        "; content: "        ";
background-position: right 0px; background-position: right 0px;
} }
/* line 240, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */ /* line 240, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */
.external-link:hover:after { .external-link:hover:after {
background-position: right 0px; background-position: right 0px;
} }
/* line 302, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */ /* line 302, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */
.external-link:after { .external-link:after {
background-image: image-url("external-links/external-link-black-12x12.png"); background-image: image-url("external-links/external-link-black-12x12.png");
background-repeat: no-repeat; background-repeat: no-repeat;
} }
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 20 / 10), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) { @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 20 / 10), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
/* line 302, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */ /* line 302, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_frontend_toolkit/stylesheets/_typography.scss */
.external-link:after { .external-link:after {
background-image: image-url("external-links/external-link-black-24x24.png"); background-image: image-url("external-links/external-link-black-24x24.png");
background-size: 12px 400px; background-size: 12px 400px;
@@ -249,7 +249,7 @@ a[rel="external"]:hover:after {
* 3. Removes Android and iOS tap highlight color to prevent entire container being highlighted * 3. Removes Android and iOS tap highlight color to prevent entire container being highlighted
* www.yuiblog.com/blog/2010/10/01/quick-tip-customizing-the-mobile-safari-tap-highlight-color/ * www.yuiblog.com/blog/2010/10/01/quick-tip-customizing-the-mobile-safari-tap-highlight-color/
*/ */
/* line 117, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 117, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
html { html {
font-size: 62.5%; font-size: 62.5%;
/* 1 */ /* 1 */
@@ -265,7 +265,7 @@ html {
* (62.5% * 160% = 100%) * (62.5% * 160% = 100%)
* 2. Addresses margins handled incorrectly in IE6/7 * 2. Addresses margins handled incorrectly in IE6/7
*/ */
/* line 130, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 130, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
body { body {
font-size: 160%; font-size: 160%;
/* 1 */ /* 1 */
@@ -273,18 +273,18 @@ body {
/* 2 */ /* 2 */
} }
/* line 135, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 135, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
b, b,
strong { strong {
font-weight: 600; font-weight: 600;
} }
/* line 140, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 140, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
img { img {
border: 0; border: 0;
} }
/* line 150, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 150, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
abbr[title] { abbr[title] {
cursor: help; cursor: help;
} }
@@ -294,7 +294,7 @@ abbr[title] {
* 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof). * (include `-moz` to future-proof).
*/ */
/* line 160, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 160, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
input[type="search"] { input[type="search"] {
-webkit-appearance: textfield; -webkit-appearance: textfield;
/* 1 */ /* 1 */
@@ -304,19 +304,19 @@ input[type="search"] {
box-sizing: content-box; box-sizing: content-box;
} }
/* line 166, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 166, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
input[type="search"]::-webkit-search-cancel-button { input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: searchfield-cancel-button; -webkit-appearance: searchfield-cancel-button;
margin-right: 2px; margin-right: 2px;
} }
/* line 171, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */ /* line 171, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_basic.scss */
input[type="search"]::-webkit-search-decoration { input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none; -webkit-appearance: none;
} }
/* For image replacement */ /* For image replacement */
/* line 2, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 2, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
.ir { .ir {
display: block; display: block;
text-indent: -999em; text-indent: -999em;
@@ -325,20 +325,20 @@ input[type="search"]::-webkit-search-decoration {
text-align: left; text-align: left;
direction: ltr; direction: ltr;
} }
/* line 10, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 10, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
.ir br { .ir br {
display: none; display: none;
} }
/* Hide for both screenreaders and browsers */ /* Hide for both screenreaders and browsers */
/* line 16, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 16, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
.hidden { .hidden {
display: none; display: none;
visibility: hidden; visibility: hidden;
} }
/* Hide only visually, but have it available for screenreaders */ /* Hide only visually, but have it available for screenreaders */
/* line 22, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 22, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
.visually-hidden, .visually-hidden,
.visuallyhidden { .visuallyhidden {
position: absolute; position: absolute;
@@ -348,7 +348,7 @@ input[type="search"]::-webkit-search-decoration {
* focusable when navigated to via the keyboard * focusable when navigated to via the keyboard
*/ */
} }
/* line 31, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 31, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
.visually-hidden.focusable:active, .visually-hidden.focusable:focus, .visually-hidden.focusable:active, .visually-hidden.focusable:focus,
.visuallyhidden.focusable:active, .visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus { .visuallyhidden.focusable:focus {
@@ -361,54 +361,54 @@ input[type="search"]::-webkit-search-decoration {
} }
/* Hide visually and from screenreaders, but maintain layout */ /* Hide visually and from screenreaders, but maintain layout */
/* line 43, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 43, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
.invisible { .invisible {
visibility: hidden; visibility: hidden;
} }
/* Give a strong clear visual idea as to what is currently in focus */ /* Give a strong clear visual idea as to what is currently in focus */
/* line 48, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 48, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
a { a {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0.3); -webkit-tap-highlight-color: rgba(0, 0, 0, 0.3);
} }
/* line 52, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 52, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
a:focus { a:focus {
background-color: #ffbf47; background-color: #ffbf47;
outline: 3px solid #ffbf47; outline: 3px solid #ffbf47;
} }
/* Make skiplinks visible when they are tabbed to */ /* Make skiplinks visible when they are tabbed to */
/* line 59, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 59, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
.skiplink { .skiplink {
position: absolute; position: absolute;
left: -9999em; left: -9999em;
} }
/* line 64, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 64, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
.skiplink:focus { .skiplink:focus {
position: static; position: static;
} }
/* line 68, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 68, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
#skiplink-container { #skiplink-container {
text-align: center; text-align: center;
background: #0b0c0c; background: #0b0c0c;
} }
/* line 72, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 72, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
#skiplink-container div { #skiplink-container div {
text-align: left; text-align: left;
margin: 0 auto; margin: 0 auto;
max-width: 1020px; max-width: 1020px;
} }
/* line 78, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 78, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
#skiplink-container .skiplink { #skiplink-container .skiplink {
display: -moz-inline-stack; display: -moz-inline-stack;
display: inline-block; display: inline-block;
margin: 0.75em 0 0 30px; margin: 0.75em 0 0 30px;
} }
/* line 84, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 84, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
input:focus, input:focus,
textarea:focus, textarea:focus,
select:focus, select:focus,
@@ -417,12 +417,12 @@ button:focus,
outline: 3px solid #ffbf47; outline: 3px solid #ffbf47;
} }
/* line 93, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 93, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
#global-header h1 a:focus { #global-header h1 a:focus {
background-color: transparent; background-color: transparent;
outline: none; outline: none;
} }
/* line 98, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */ /* line 98, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_accessibility.scss */
#global-header a:focus { #global-header a:focus {
color: #0b0c0c; color: #0b0c0c;
} }
@@ -430,12 +430,12 @@ button:focus,
/* @import '_shims'; */ /* @import '_shims'; */
/* @import '_conditionals'; */ /* @import '_conditionals'; */
/* @import '_measurements'; */ /* @import '_measurements'; */
/* line 5, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 5, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header { #global-header {
background-color: #0b0c0c; background-color: #0b0c0c;
width: 100%; width: 100%;
} }
/* line 9, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 9, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-wrapper { #global-header .header-wrapper {
background-color: #0b0c0c; background-color: #0b0c0c;
max-width: 990px; max-width: 990px;
@@ -444,61 +444,61 @@ button:focus,
padding-bottom: 8px; padding-bottom: 8px;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 9, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 9, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-wrapper { #global-header .header-wrapper {
padding-left: 15px; padding-left: 15px;
padding-right: 15px; padding-right: 15px;
} }
} }
/* line 26, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 26, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-wrapper .header-global .header-logo { #global-header .header-wrapper .header-global .header-logo {
float: left; float: left;
} }
@media (min-width: 769px) { @media (min-width: 769px) {
/* line 26, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 26, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-wrapper .header-global .header-logo { #global-header .header-wrapper .header-global .header-logo {
width: 33.33%; width: 33.33%;
} }
} }
@media screen and (max-width: 379px) { @media screen and (max-width: 379px) {
/* line 26, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 26, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-wrapper .header-global .header-logo { #global-header .header-wrapper .header-global .header-logo {
width: auto; width: auto;
float: none; float: none;
} }
} }
/* line 38, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 38, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-wrapper .header-global .header-logo .content { #global-header .header-wrapper .header-global .header-logo .content {
margin: 0 15px; margin: 0 15px;
} }
/* line 42, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 42, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-wrapper .header-global .header-logo { #global-header .header-wrapper .header-global .header-logo {
margin: 5px 0 2px; margin: 5px 0 2px;
} }
@media (min-width: 769px) { @media (min-width: 769px) {
/* line 49, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 49, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header.with-proposition .header-wrapper .header-global { #global-header.with-proposition .header-wrapper .header-global {
float: left; float: left;
width: 33.33%; width: 33.33%;
} }
/* line 54, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 54, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header.with-proposition .header-wrapper .header-global .header-logo, #global-header.with-proposition .header-wrapper .header-global .header-logo,
#global-header.with-proposition .header-wrapper .header-global .site-search { #global-header.with-proposition .header-wrapper .header-global .site-search {
width: 100%; width: 100%;
} }
} }
@media (min-width: 769px) { @media (min-width: 769px) {
/* line 60, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 60, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header.with-proposition .header-wrapper .header-proposition { #global-header.with-proposition .header-wrapper .header-proposition {
width: 66.66%; width: 66.66%;
float: left; float: left;
} }
} }
/* line 65, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 65, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header.with-proposition .header-wrapper .header-proposition .content { #global-header.with-proposition .header-wrapper .header-proposition .content {
margin: 0 15px; margin: 0 15px;
} }
/* line 72, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 72, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header #logo { #global-header #logo {
float: left; float: left;
position: relative; position: relative;
@@ -519,7 +519,7 @@ button:focus,
background-size: 35px 31px; background-size: 35px 31px;
background-position: 0 0; background-position: 0 0;
} }
/* line 98, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 98, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header #logo img { #global-header #logo img {
position: relative; position: relative;
top: -2px; top: -2px;
@@ -532,26 +532,26 @@ button:focus,
border: none; border: none;
/* visibility: hidden; */ /* visibility: hidden; */
} }
/* line 115, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 115, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header #logo:hover, #global-header #logo:focus { #global-header #logo:hover, #global-header #logo:focus {
text-decoration: none; text-decoration: none;
border-bottom-color: #fff; border-bottom-color: #fff;
} }
/* line 121, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 121, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header #logo:active { #global-header #logo:active {
color: #2b8cc4; color: #2b8cc4;
} }
/* line 125, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 125, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition { #global-header .header-proposition {
padding-top: 10px; padding-top: 10px;
} }
@media (min-width: 769px) { @media (min-width: 769px) {
/* line 125, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 125, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition { #global-header .header-proposition {
padding-top: 0; padding-top: 0;
} }
} }
/* line 130, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 130, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-name { #global-header .header-proposition #proposition-name {
font-family: "nta", Arial, sans-serif; font-family: "nta", Arial, sans-serif;
font-size: 18px; font-size: 18px;
@@ -563,17 +563,17 @@ button:focus,
text-decoration: none; text-decoration: none;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 130, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 130, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-name { #global-header .header-proposition #proposition-name {
font-size: 24px; font-size: 24px;
line-height: 1.25; line-height: 1.25;
} }
} }
/* line 136, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 136, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition a#proposition-name:hover { #global-header .header-proposition a#proposition-name:hover {
text-decoration: underline; text-decoration: underline;
} }
/* line 139, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 139, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition a.menu { #global-header .header-proposition a.menu {
font-family: "nta", Arial, sans-serif; font-family: "nta", Arial, sans-serif;
font-size: 14px; font-size: 14px;
@@ -587,23 +587,23 @@ button:focus,
padding-top: 6px; padding-top: 6px;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 139, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 139, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition a.menu { #global-header .header-proposition a.menu {
font-size: 16px; font-size: 16px;
line-height: 1.25; line-height: 1.25;
} }
} }
@media (min-width: 769px) { @media (min-width: 769px) {
/* line 139, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 139, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition a.menu { #global-header .header-proposition a.menu {
display: none; display: none;
} }
} }
/* line 149, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 149, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition a.menu:hover { #global-header .header-proposition a.menu:hover {
text-decoration: underline; text-decoration: underline;
} }
/* line 152, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 152, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition a.menu:after { #global-header .header-proposition a.menu:after {
display: inline-block; display: inline-block;
font-size: 8px; font-size: 8px;
@@ -612,45 +612,45 @@ button:focus,
vertical-align: middle; vertical-align: middle;
content: " \25BC"; content: " \25BC";
} }
/* line 160, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 160, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition a.menu.js-hidden:after { #global-header .header-proposition a.menu.js-hidden:after {
content: " \25B2"; content: " \25B2";
} }
/* line 164, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 164, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-menu { #global-header .header-proposition #proposition-menu {
margin-top: 5px; margin-top: 5px;
} }
@media (min-width: 769px) { @media (min-width: 769px) {
/* line 168, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 168, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-menu.no-proposition-name { #global-header .header-proposition #proposition-menu.no-proposition-name {
margin-top: 37px; margin-top: 37px;
} }
} }
/* line 175, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 175, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-link, #global-header .header-proposition #proposition-link,
#global-header .header-proposition #proposition-links { #global-header .header-proposition #proposition-links {
clear: both; clear: both;
margin: 2px 0 0 0; margin: 2px 0 0 0;
padding: 0; padding: 0;
} }
/* line 182, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 182, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
.js-enabled #global-header .header-proposition #proposition-link, .js-enabled .js-enabled #global-header .header-proposition #proposition-link, .js-enabled
#global-header .header-proposition #proposition-links { #global-header .header-proposition #proposition-links {
display: none; display: none;
} }
@media (min-width: 769px) { @media (min-width: 769px) {
/* line 182, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 182, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
.js-enabled #global-header .header-proposition #proposition-link, .js-enabled .js-enabled #global-header .header-proposition #proposition-link, .js-enabled
#global-header .header-proposition #proposition-links { #global-header .header-proposition #proposition-links {
display: block; display: block;
} }
} }
/* line 187, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 187, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
.js-enabled #global-header .header-proposition #proposition-link.js-visible, .js-enabled .js-enabled #global-header .header-proposition #proposition-link.js-visible, .js-enabled
#global-header .header-proposition #proposition-links.js-visible { #global-header .header-proposition #proposition-links.js-visible {
display: block; display: block;
} }
/* line 192, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 192, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-link li, #global-header .header-proposition #proposition-link li,
#global-header .header-proposition #proposition-links li { #global-header .header-proposition #proposition-links li {
float: left; float: left;
@@ -659,7 +659,7 @@ button:focus,
border-bottom: 1px solid #2e3133; border-bottom: 1px solid #2e3133;
} }
@media (min-width: 769px) { @media (min-width: 769px) {
/* line 192, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 192, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-link li, #global-header .header-proposition #proposition-link li,
#global-header .header-proposition #proposition-links li { #global-header .header-proposition #proposition-links li {
display: block; display: block;
@@ -667,13 +667,13 @@ button:focus,
padding: 0 15px 0 0; padding: 0 15px 0 0;
border-bottom: 0; border-bottom: 0;
} }
/* line 204, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 204, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-link li.clear-child, #global-header .header-proposition #proposition-link li.clear-child,
#global-header .header-proposition #proposition-links li.clear-child { #global-header .header-proposition #proposition-links li.clear-child {
clear: left; clear: left;
} }
} }
/* line 210, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 210, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-link a, #global-header .header-proposition #proposition-link a,
#global-header .header-proposition #proposition-links a { #global-header .header-proposition #proposition-links a {
color: #fff; color: #fff;
@@ -685,7 +685,7 @@ button:focus,
text-transform: none; text-transform: none;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 210, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 210, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-link a, #global-header .header-proposition #proposition-link a,
#global-header .header-proposition #proposition-links a { #global-header .header-proposition #proposition-links a {
font-size: 14px; font-size: 14px;
@@ -693,7 +693,7 @@ button:focus,
} }
} }
@media (min-width: 769px) { @media (min-width: 769px) {
/* line 210, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 210, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-link a, #global-header .header-proposition #proposition-link a,
#global-header .header-proposition #proposition-links a { #global-header .header-proposition #proposition-links a {
font-family: "nta", Arial, sans-serif; font-family: "nta", Arial, sans-serif;
@@ -705,7 +705,7 @@ button:focus,
} }
} }
@media (min-width: 769px) and (min-width: 641px) { @media (min-width: 769px) and (min-width: 641px) {
/* line 210, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 210, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-link a, #global-header .header-proposition #proposition-link a,
#global-header .header-proposition #proposition-links a { #global-header .header-proposition #proposition-links a {
font-size: 16px; font-size: 16px;
@@ -713,59 +713,59 @@ button:focus,
} }
} }
/* line 220, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 220, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-link a:hover, #global-header .header-proposition #proposition-link a:hover,
#global-header .header-proposition #proposition-links a:hover { #global-header .header-proposition #proposition-links a:hover {
text-decoration: underline; text-decoration: underline;
} }
/* line 223, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 223, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-link a.active, #global-header .header-proposition #proposition-link a.active,
#global-header .header-proposition #proposition-links a.active { #global-header .header-proposition #proposition-links a.active {
color: #1d8feb; color: #1d8feb;
} }
/* line 226, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 226, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-link a:focus, #global-header .header-proposition #proposition-link a:focus,
#global-header .header-proposition #proposition-links a:focus { #global-header .header-proposition #proposition-links a:focus {
color: #0b0c0c; color: #0b0c0c;
} }
/* line 232, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 232, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-link { #global-header .header-proposition #proposition-link {
float: right; float: right;
line-height: 22px; line-height: 22px;
} }
/* line 235, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 235, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
.js-enabled #global-header .header-proposition #proposition-link { .js-enabled #global-header .header-proposition #proposition-link {
display: block; display: block;
} }
@media (min-width: 769px) { @media (min-width: 769px) {
/* line 232, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 232, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header .header-proposition #proposition-link { #global-header .header-proposition #proposition-link {
float: none; float: none;
} }
} }
/* Global header bar */ /* Global header bar */
/* line 247, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 247, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-header-bar { #global-header-bar {
height: 10px; height: 10px;
background-color: #005ea5; background-color: #005ea5;
} }
/* Global cookie message */ /* Global cookie message */
/* line 258, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 258, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
.js-enabled #global-cookie-message { .js-enabled #global-cookie-message {
display: none; display: none;
/* shown with JS, always on for non-JS */ /* shown with JS, always on for non-JS */
} }
/* line 262, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 262, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-cookie-message { #global-cookie-message {
width: 100%; width: 100%;
background-color: #d5e8f3; background-color: #d5e8f3;
padding-top: 10px; padding-top: 10px;
padding-bottom: 10px; padding-bottom: 10px;
} }
/* line 267, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 267, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-cookie-message p { #global-cookie-message p {
font-family: "nta", Arial, sans-serif; font-family: "nta", Arial, sans-serif;
font-size: 14px; font-size: 14px;
@@ -776,7 +776,7 @@ button:focus,
margin-bottom: 0; margin-bottom: 0;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 267, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */ /* line 267, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_header.scss */
#global-cookie-message p { #global-cookie-message p {
font-size: 16px; font-size: 16px;
line-height: 1.25; line-height: 1.25;
@@ -784,12 +784,12 @@ button:focus,
} }
/* Global footer */ /* Global footer */
/* line 3, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 3, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer { #footer {
background-color: #DEE0E2; background-color: #DEE0E2;
border-top: 1px solid #a1acb2; border-top: 1px solid #a1acb2;
} }
/* line 7, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 7, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-wrapper { #footer .footer-wrapper {
margin: 0 auto; margin: 0 auto;
width: auto; width: auto;
@@ -799,20 +799,20 @@ button:focus,
margin: 0 auto; margin: 0 auto;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 7, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 7, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-wrapper { #footer .footer-wrapper {
padding-top: 60px; padding-top: 60px;
} }
} }
/* line 17, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 17, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer a { #footer a {
color: #454a4c; color: #454a4c;
} }
/* line 20, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 20, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer a:hover { #footer a:hover {
color: #171819; color: #171819;
} }
/* line 25, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 25, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer h2 { #footer h2 {
font-family: "nta", Arial, sans-serif; font-family: "nta", Arial, sans-serif;
font-size: 18px; font-size: 18px;
@@ -824,17 +824,17 @@ button:focus,
margin: 0; margin: 0;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 25, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 25, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer h2 { #footer h2 {
font-size: 24px; font-size: 24px;
line-height: 1.25; line-height: 1.25;
} }
} }
/* line 31, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 31, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer h2 a { #footer h2 a {
color: inherit; color: inherit;
} }
/* line 36, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 36, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta { #footer .footer-meta {
padding-left: 15px; padding-left: 15px;
padding-right: 15px; padding-right: 15px;
@@ -844,25 +844,25 @@ button:focus,
color: #454a4c; color: #454a4c;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 36, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 36, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta { #footer .footer-meta {
padding-left: 30px; padding-left: 30px;
padding-right: 30px; padding-right: 30px;
} }
} }
/* line 44, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 44, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .footer-meta-inner { #footer .footer-meta .footer-meta-inner {
display: inline-block; display: inline-block;
vertical-align: bottom; vertical-align: bottom;
width: 100%; width: 100%;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 44, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 44, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .footer-meta-inner { #footer .footer-meta .footer-meta-inner {
width: 75%; width: 75%;
} }
} }
/* line 58, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 58, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .footer-meta-inner ul { #footer .footer-meta .footer-meta-inner ul {
font-family: "nta", Arial, sans-serif; font-family: "nta", Arial, sans-serif;
font-size: 14px; font-size: 14px;
@@ -875,41 +875,41 @@ button:focus,
padding: 0; padding: 0;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 58, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 58, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .footer-meta-inner ul { #footer .footer-meta .footer-meta-inner ul {
font-size: 16px; font-size: 16px;
line-height: 1.5; line-height: 1.5;
} }
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 58, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 58, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .footer-meta-inner ul { #footer .footer-meta .footer-meta-inner ul {
margin: 0 0 1em 0; margin: 0 0 1em 0;
} }
} }
/* line 69, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 69, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .footer-meta-inner ul li { #footer .footer-meta .footer-meta-inner ul li {
display: inline-block; display: inline-block;
margin: 0 15px 0 0; margin: 0 15px 0 0;
} }
/* line 81, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 81, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .footer-meta-inner .open-government-licence { #footer .footer-meta .footer-meta-inner .open-government-licence {
clear: left; clear: left;
position: relative; position: relative;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 81, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 81, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .footer-meta-inner .open-government-licence { #footer .footer-meta .footer-meta-inner .open-government-licence {
padding-left: 53px; padding-left: 53px;
} }
} }
/* line 93, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 93, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .footer-meta-inner .open-government-licence .logo { #footer .footer-meta .footer-meta-inner .open-government-licence .logo {
margin-bottom: 1em; margin-bottom: 1em;
padding-top: 0; padding-top: 0;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 93, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 93, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .footer-meta-inner .open-government-licence .logo { #footer .footer-meta .footer-meta-inner .open-government-licence .logo {
position: absolute; position: absolute;
left: 0; left: 0;
@@ -918,7 +918,7 @@ button:focus,
height: 100%; height: 100%;
} }
} }
/* line 104, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 104, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .footer-meta-inner .open-government-licence .logo a { #footer .footer-meta .footer-meta-inner .open-government-licence .logo a {
display: block; display: block;
width: 41px; width: 41px;
@@ -928,13 +928,13 @@ button:focus,
background: image-url("/static/images/open-government-licence.png") 0 0 no-repeat; background: image-url("/static/images/open-government-licence.png") 0 0 no-repeat;
} }
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 20 / 10), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) { @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 20 / 10), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
/* line 104, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 104, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .footer-meta-inner .open-government-licence .logo a { #footer .footer-meta .footer-meta-inner .open-government-licence .logo a {
background-image: image-url("/static/images/open-government-licence_2x.png"); background-image: image-url("/static/images/open-government-licence_2x.png");
background-size: 41px 17px; background-size: 41px 17px;
} }
} }
/* line 118, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 118, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .footer-meta-inner .open-government-licence p { #footer .footer-meta .footer-meta-inner .open-government-licence p {
font-family: "nta", Arial, sans-serif; font-family: "nta", Arial, sans-serif;
font-size: 14px; font-size: 14px;
@@ -945,13 +945,13 @@ button:focus,
padding-top: 0.1em; padding-top: 0.1em;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 118, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 118, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .footer-meta-inner .open-government-licence p { #footer .footer-meta .footer-meta-inner .open-government-licence p {
font-size: 16px; font-size: 16px;
line-height: 1.25; line-height: 1.25;
} }
} }
/* line 126, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 126, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .copyright { #footer .footer-meta .copyright {
font-family: "nta", Arial, sans-serif; font-family: "nta", Arial, sans-serif;
font-size: 14px; font-size: 14px;
@@ -963,14 +963,14 @@ button:focus,
display: block; display: block;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 126, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 126, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .copyright { #footer .footer-meta .copyright {
font-size: 16px; font-size: 16px;
line-height: 1.25; line-height: 1.25;
} }
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 126, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 126, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .copyright { #footer .footer-meta .copyright {
display: inline-block; display: inline-block;
text-align: inherit; text-align: inherit;
@@ -979,7 +979,7 @@ button:focus,
margin-top: 0; margin-top: 0;
} }
} }
/* line 147, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 147, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .copyright a { #footer .footer-meta .copyright a {
display: block; display: block;
background-image: url("/static/images/govuk-crest.png"); background-image: url("/static/images/govuk-crest.png");
@@ -990,20 +990,20 @@ button:focus,
padding: 115px 0 0 0; padding: 115px 0 0 0;
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 147, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 147, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .copyright a { #footer .footer-meta .copyright a {
background-position: 100% 0%; background-position: 100% 0%;
} }
} }
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 20 / 10), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) { @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 20 / 10), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
/* line 147, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 147, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .copyright a { #footer .footer-meta .copyright a {
background-image: url("/static/images/govuk-crest-2x.png"); background-image: url("/static/images/govuk-crest-2x.png");
background-size: 125px 102px; background-size: 125px 102px;
} }
} }
@media (min-width: 641px) { @media (min-width: 641px) {
/* line 147, /Users/chs/gdsworkspace/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */ /* line 147, /Users/rebeccalaw/dev-projects/notify/notifications-admin/app/assets/stylesheets/govuk_template/_footer.scss */
#footer .footer-meta .copyright a { #footer .footer-meta .copyright a {
text-align: right; text-align: right;
} }

View File

@@ -13,19 +13,17 @@ GOV.UK Notify
<p>Check your email address is correct and then resend the confirmation code.</p> <p>Check your email address is correct and then resend the confirmation code.</p>
<p> <p>
</p>
<form autocomplete="off" action="" method="post"> <form autocomplete="off" action="" method="post">
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
<label class="form-label">Email address</label> <label class="form-label">Email address</label>
{{ form.email_address(class="form-control-2-3", autocomplete="off") }} <br> {{ form.email_address(class="form-control-2-3", autocomplete="off") }} <br>
<span class="font-xsmall">Your email address must end in .gov.uk</span> <span class="font-xsmall">Your email address must end in .gov.uk</span>
<p>
<button class="button" href="verify" role="button">Resend confirmation code</button>
</p>
</form> </form>
</p>
<p>
<a class="button" href="verify" role="button">Resend confirmation code</a>
</p>
</div> </div>
</div> </div>

View File

@@ -13,7 +13,8 @@ GOV.UK Notify
<p>Check your mobile phone number is correct and then resend the confirmation code.</p> <p>Check your mobile phone number is correct and then resend the confirmation code.</p>
<form autocomplete="off" action="" method="post"> <form autocomplete="off" action="" method="post">
<p> {{ form.hidden_tag() }}
<p>
<label class="form-label">Mobile phone number</label> <label class="form-label">Mobile phone number</label>
{{ form.mobile_number(class="form-control-1-4", autocomplete="off") }} <br> {{ form.mobile_number(class="form-control-1-4", autocomplete="off") }} <br>
</p> </p>

View File

@@ -4,13 +4,25 @@ from app.main.dao import users_dao
from app.models import User from app.models import User
def create_test_user(): def create_test_user(state):
user = User(name='Test User', user = User(name='Test User',
password='somepassword', password='somepassword',
email_address='test@user.gov.uk', email_address='test@user.gov.uk',
mobile_number='+441234123412', mobile_number='+441234123412',
created_at=datetime.now(), created_at=datetime.now(),
role_id=1, role_id=1,
state='pending') state=state)
users_dao.insert_user(user)
return user
def create_another_test_user(state):
user = User(name='Another Test User',
password='someOtherpassword',
email_address='another_test@user.gov.uk',
mobile_number='+442233123412',
created_at=datetime.now(),
role_id=1,
state=state)
users_dao.insert_user(user) users_dao.insert_user(user)
return user return user

View File

@@ -6,7 +6,7 @@ from tests.app.main import create_test_user
def test_can_insert_and_retrieve_new_service(notifications_admin, notifications_admin_db, notify_db_session): def test_can_insert_and_retrieve_new_service(notifications_admin, notifications_admin_db, notify_db_session):
user = create_test_user() user = create_test_user('active')
id = services_dao.insert_new_service('testing service', user) id = services_dao.insert_new_service('testing service', user)
saved_service = services_dao.get_service_by_id(id) saved_service = services_dao.get_service_by_id(id)
assert id == saved_service.id assert id == saved_service.id
@@ -15,7 +15,7 @@ def test_can_insert_and_retrieve_new_service(notifications_admin, notifications_
def test_unrestrict_service_updates_the_service(notifications_admin, notifications_admin_db, notify_db_session): def test_unrestrict_service_updates_the_service(notifications_admin, notifications_admin_db, notify_db_session):
user = create_test_user() user = create_test_user('active')
id = services_dao.insert_new_service('unrestricted service', user) id = services_dao.insert_new_service('unrestricted service', user)
saved_service = services_dao.get_service_by_id(id) saved_service = services_dao.get_service_by_id(id)
assert saved_service.restricted is True assert saved_service.restricted is True
@@ -25,7 +25,7 @@ def test_unrestrict_service_updates_the_service(notifications_admin, notificatio
def test_activate_service_update_service(notifications_admin, notifications_admin_db, notify_db_session): def test_activate_service_update_service(notifications_admin, notifications_admin_db, notify_db_session):
user = create_test_user() user = create_test_user('active')
id = services_dao.insert_new_service('activated service', user) id = services_dao.insert_new_service('activated service', user)
service = services_dao.get_service_by_id(id) service = services_dao.get_service_by_id(id)
assert service.active is False assert service.active is False
@@ -44,7 +44,7 @@ def test_get_service_returns_none_if_service_does_not_exist(notifications_admin,
def test_find_by_service_name_returns_right_service(notifications_admin, def test_find_by_service_name_returns_right_service(notifications_admin,
notifications_admin_db, notifications_admin_db,
notify_db_session): notify_db_session):
user = create_test_user() user = create_test_user('active')
id = services_dao.insert_new_service('testing service', user) id = services_dao.insert_new_service('testing service', user)
another = services_dao.insert_new_service('Testing the Service', user) another = services_dao.insert_new_service('Testing the Service', user)
found = services_dao.find_service_by_service_name('testing service') found = services_dao.find_service_by_service_name('testing service')
@@ -55,7 +55,7 @@ def test_find_by_service_name_returns_right_service(notifications_admin,
def test_should_not_allow_two_services_of_the_same_name(notifications_admin, notifications_admin_db, notify_db_session): def test_should_not_allow_two_services_of_the_same_name(notifications_admin, notifications_admin_db, notify_db_session):
user = create_test_user() user = create_test_user('active')
services_dao.insert_new_service('duplicate service', user) services_dao.insert_new_service('duplicate service', user)
with pytest.raises(sqlalchemy.exc.IntegrityError) as error: with pytest.raises(sqlalchemy.exc.IntegrityError) as error:
services_dao.insert_new_service('duplicate service', user) services_dao.insert_new_service('duplicate service', user)

View File

@@ -7,10 +7,12 @@ from tests.app.main import create_test_user
def test_insert_new_code_and_get_it_back(notifications_admin, notifications_admin_db, notify_db_session): def test_insert_new_code_and_get_it_back(notifications_admin, notifications_admin_db, notify_db_session):
user = create_test_user() user = create_test_user('pending')
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='email') verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='email')
saved_code = verify_codes_dao.get_code(user_id=user.id, code_type='email') saved_codes = verify_codes_dao.get_codes(user_id=user.id, code_type='email')
assert len(saved_codes) == 1
saved_code = saved_codes[0]
assert saved_code.user_id == user.id assert saved_code.user_id == user.id
assert check_hash('12345', saved_code.code) assert check_hash('12345', saved_code.code)
assert saved_code.code_type == 'email' assert saved_code.code_type == 'email'
@@ -20,7 +22,7 @@ def test_insert_new_code_and_get_it_back(notifications_admin, notifications_admi
def test_insert_new_code_should_thrw_exception_when_type_does_not_exist(notifications_admin, def test_insert_new_code_should_thrw_exception_when_type_does_not_exist(notifications_admin,
notifications_admin_db, notifications_admin_db,
notify_db_session): notify_db_session):
user = create_test_user() user = create_test_user('pending')
try: try:
verify_codes_dao.add_code(user_id=user.id, code='23545', code_type='not_real') verify_codes_dao.add_code(user_id=user.id, code='23545', code_type='not_real')
fail('Should have thrown an exception') fail('Should have thrown an exception')
@@ -42,7 +44,7 @@ def test_should_throw_exception_when_user_does_not_exist(notifications_admin,
def test_should_return_none_if_code_is_used(notifications_admin, def test_should_return_none_if_code_is_used(notifications_admin,
notifications_admin_db, notifications_admin_db,
notify_db_session): notify_db_session):
user = create_test_user() user = create_test_user('pending')
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='email') verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='email')
verify_codes_dao.use_code(user_id=user.id, code='12345', code_type='email') verify_codes_dao.use_code(user_id=user.id, code='12345', code_type='email')
@@ -53,10 +55,32 @@ def test_should_return_none_if_code_is_used(notifications_admin,
def test_should_return_none_if_code_is_used(notifications_admin, def test_should_return_none_if_code_is_used(notifications_admin,
notifications_admin_db, notifications_admin_db,
notify_db_session): notify_db_session):
user = create_test_user() user = create_test_user('pending')
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms') verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms')
code = verify_codes_dao.get_code(user_id=user.id, code_type='sms') code = verify_codes_dao.get_codes(user_id=user.id, code_type='sms')
verify_codes_dao.use_code(code.id) verify_codes_dao.use_code(code[0].id)
code = verify_codes_dao.get_code(user_id=user.id, code_type='sms') used_code = verify_codes_dao.get_codes(user_id=user.id, code_type='sms')
assert code is None assert used_code == []
def test_should_return_all_unused_code_when_there_are_many(notifications_admin,
notifications_admin_db,
notify_db_session):
user = create_test_user('pending')
another_user = create_test_user('active')
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms')
id = verify_codes_dao.add_code(user_id=user.id, code='09876', code_type='email')
verify_codes_dao.use_code(id)
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='email')
verify_codes_dao.add_code(user_id=user.id, code='23456', code_type='email')
verify_codes_dao.add_code(user_id=another_user.id, code='12345', code_type='sms')
verify_codes_dao.add_code(user_id=another_user.id, code='12345', code_type='email')
user_codes = verify_codes_dao.get_codes(user_id=user.id, code_type='email')
assert len(user_codes) == 2
s = sorted(user_codes, key=lambda r: r.expiry_datetime)
assert check_hash('12345', s[0].code)
assert check_hash('23456', s[1].code)
assert [(code.code_used, code.code_type, code.user_id) for code in user_codes] == \
[(False, 'email', user.id), (False, 'email', user.id)]

View File

@@ -8,7 +8,7 @@ def test_form_should_have_errors_when_duplicate_service_is_added(notifications_a
notify_db_session): notify_db_session):
with notifications_admin.test_request_context(method='POST', with notifications_admin.test_request_context(method='POST',
data={'service_name': 'some service'}) as req: data={'service_name': 'some service'}) as req:
user = create_test_user() user = create_test_user('active')
services_dao.insert_new_service('some service', user) services_dao.insert_new_service('some service', user)
req.session['user_id'] = user.id req.session['user_id'] = user.id
form = AddServiceForm(req.request.form) form = AddServiceForm(req.request.form)

View File

@@ -51,13 +51,12 @@ def test_returns_errors_when_code_contains_letters(notifications_admin, notifica
def test_should_return_errors_when_code_is_expired(notifications_admin, notifications_admin_db, notify_db_session): def test_should_return_errors_when_code_is_expired(notifications_admin, notifications_admin_db, notify_db_session):
with notifications_admin.test_request_context(method='POST', with notifications_admin.test_request_context(method='POST',
data={'sms_code': '23456'}) as req: data={'sms_code': '23456'}) as req:
user = create_test_user() user = create_test_user('active')
req.session['user_id'] = user.id req.session['user_id'] = user.id
verify_codes_dao.add_code_with_expiry(user_id=user.id, verify_codes_dao.add_code_with_expiry(user_id=user.id,
code='23456', code='23456',
code_type='sms', code_type='sms',
expiry=datetime.now() + timedelta(hours=-2)) expiry=datetime.now() + timedelta(hours=-2))
req.session['user_id'] = user.id
form = TwoFactorForm(req.request.form) form = TwoFactorForm(req.request.form)
assert form.validate() is False assert form.validate() is False
errors = form.errors errors = form.errors
@@ -66,6 +65,6 @@ def test_should_return_errors_when_code_is_expired(notifications_admin, notifica
def set_up_test_data(): def set_up_test_data():
user = create_test_user() user = create_test_user('active')
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms') verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms')
return user return user

View File

@@ -65,7 +65,7 @@ def test_should_return_errors_when_code_is_expired(notifications_admin, notifica
with notifications_admin.test_request_context(method='POST', with notifications_admin.test_request_context(method='POST',
data={'sms_code': '23456', data={'sms_code': '23456',
'email_code': '23456'}) as req: 'email_code': '23456'}) as req:
user = create_test_user() user = create_test_user('pending')
req.session['user_id'] = user.id req.session['user_id'] = user.id
verify_codes_dao.add_code_with_expiry(user_id=user.id, verify_codes_dao.add_code_with_expiry(user_id=user.id,
code='23456', code='23456',
@@ -87,7 +87,7 @@ def test_should_return_errors_when_code_is_expired(notifications_admin, notifica
def set_up_test_data(): def set_up_test_data():
user = create_test_user() user = create_test_user('pending')
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='email') verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='email')
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms') verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms')
return user return user

View File

@@ -5,7 +5,7 @@ from tests.app.main import create_test_user
def test_get_should_render_add_service_template(notifications_admin, notifications_admin_db, notify_db_session): def test_get_should_render_add_service_template(notifications_admin, notifications_admin_db, notify_db_session):
with notifications_admin.test_client() as client: with notifications_admin.test_client() as client:
with client.session_transaction() as session: with client.session_transaction() as session:
user = create_test_user() user = create_test_user('active')
session['user_id'] = user.id session['user_id'] = user.id
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms') verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms')
client.post('/two-factor', data={'sms_code': '12345'}) client.post('/two-factor', data={'sms_code': '12345'})
@@ -17,7 +17,7 @@ def test_get_should_render_add_service_template(notifications_admin, notificatio
def test_should_add_service_and_redirect_to_next_page(notifications_admin, notifications_admin_db, notify_db_session): def test_should_add_service_and_redirect_to_next_page(notifications_admin, notifications_admin_db, notify_db_session):
with notifications_admin.test_client() as client: with notifications_admin.test_client() as client:
with client.session_transaction() as session: with client.session_transaction() as session:
user = create_test_user() user = create_test_user('active')
session['user_id'] = user.id session['user_id'] = user.id
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms') verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms')
client.post('/two-factor', data={'sms_code': '12345'}) client.post('/two-factor', data={'sms_code': '12345'})
@@ -33,7 +33,7 @@ def test_should_return_form_errors_when_service_name_is_empty(notifications_admi
notify_db_session): notify_db_session):
with notifications_admin.test_client() as client: with notifications_admin.test_client() as client:
with client.session_transaction() as session: with client.session_transaction() as session:
user = create_test_user() user = create_test_user('active')
session['user_id'] = user.id session['user_id'] = user.id
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms') verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms')
client.post('/two-factor', data={'sms_code': '12345'}) client.post('/two-factor', data={'sms_code': '12345'})

View File

@@ -1,4 +1,3 @@
from app import admin_api_client
from app.main.dao import verify_codes_dao, users_dao from app.main.dao import verify_codes_dao, users_dao
from tests.app.main import create_test_user from tests.app.main import create_test_user
@@ -8,7 +7,7 @@ def test_should_render_email_code_not_received_template_and_populate_email_addre
notify_db_session): notify_db_session):
with notifications_admin.test_client() as client: with notifications_admin.test_client() as client:
with client.session_transaction() as session: with client.session_transaction() as session:
user = create_test_user() user = create_test_user('pending')
session['user_id'] = user.id session['user_id'] = user.id
response = client.get('/email-not-received') response = client.get('/email-not-received')
assert response.status_code == 200 assert response.status_code == 200
@@ -24,7 +23,7 @@ def test_should_check_and_resend_email_code_redirect_to_verify(notifications_adm
with notifications_admin.test_client() as client: with notifications_admin.test_client() as client:
with client.session_transaction() as session: with client.session_transaction() as session:
_set_up_mocker(mocker) _set_up_mocker(mocker)
user = create_test_user() user = create_test_user('pending')
session['user_id'] = user.id session['user_id'] = user.id
verify_codes_dao.add_code(user.id, code='12345', code_type='email') verify_codes_dao.add_code(user.id, code='12345', code_type='email')
response = client.post('/email-not-received', response = client.post('/email-not-received',
@@ -40,7 +39,7 @@ def test_should_render_text_code_not_received_template(notifications_admin,
with notifications_admin.test_client() as client: with notifications_admin.test_client() as client:
with client.session_transaction() as session: with client.session_transaction() as session:
_set_up_mocker(mocker) _set_up_mocker(mocker)
user = create_test_user() user = create_test_user('pending')
session['user_id'] = user.id session['user_id'] = user.id
verify_codes_dao.add_code(user.id, code='12345', code_type='email') verify_codes_dao.add_code(user.id, code='12345', code_type='email')
response = client.get('/text-not-received') response = client.get('/text-not-received')
@@ -57,7 +56,7 @@ def test_should_check_and_redirect_to_verify(notifications_admin,
with notifications_admin.test_client() as client: with notifications_admin.test_client() as client:
with client.session_transaction() as session: with client.session_transaction() as session:
_set_up_mocker(mocker) _set_up_mocker(mocker)
user = create_test_user() user = create_test_user('pending')
session['user_id'] = user.id session['user_id'] = user.id
verify_codes_dao.add_code(user.id, code='12345', code_type='sms') verify_codes_dao.add_code(user.id, code='12345', code_type='sms')
response = client.post('/text-not-received', response = client.post('/text-not-received',
@@ -73,7 +72,7 @@ def test_should_update_email_address_resend_code(notifications_admin,
with notifications_admin.test_client() as client: with notifications_admin.test_client() as client:
with client.session_transaction() as session: with client.session_transaction() as session:
_set_up_mocker(mocker) _set_up_mocker(mocker)
user = create_test_user() user = create_test_user('pending')
session['user_id'] = user.id session['user_id'] = user.id
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='email') verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='email')
response = client.post('/email-not-received', response = client.post('/email-not-received',
@@ -91,7 +90,7 @@ def test_should_update_mobile_number_resend_code(notifications_admin,
with notifications_admin.test_client() as client: with notifications_admin.test_client() as client:
with client.session_transaction() as session: with client.session_transaction() as session:
_set_up_mocker(mocker) _set_up_mocker(mocker)
user = create_test_user() user = create_test_user('pending')
session['user_id'] = user.id session['user_id'] = user.id
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms') verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms')
response = client.post('/text-not-received', response = client.post('/text-not-received',

View File

@@ -20,7 +20,8 @@ def test_process_sign_in_return_2fa_template(notifications_admin, notifications_
mobile_number='+441234123123', mobile_number='+441234123123',
name='valid', name='valid',
created_at=datetime.now(), created_at=datetime.now(),
role_id=1) role_id=1,
state='active')
users_dao.insert_user(user) users_dao.insert_user(user)
response = notifications_admin.test_client().post('/sign-in', response = notifications_admin.test_client().post('/sign-in',
data={'email_address': 'valid@example.gov.uk', data={'email_address': 'valid@example.gov.uk',
@@ -37,7 +38,8 @@ def test_should_return_locked_out_true_when_user_is_locked(notifications_admin,
mobile_number='+441234123123', mobile_number='+441234123123',
name='valid', name='valid',
created_at=datetime.now(), created_at=datetime.now(),
role_id=1) role_id=1,
state='active')
users_dao.insert_user(user) users_dao.insert_user(user)
for _ in range(10): for _ in range(10):
notifications_admin.test_client().post('/sign-in', notifications_admin.test_client().post('/sign-in',
@@ -86,6 +88,22 @@ def test_should_return_401_when_user_does_not_exist(notifications_admin, notific
assert response.status_code == 401 assert response.status_code == 401
def test_should_return_400_when_user_is_not_active(notifications_admin, notifications_admin_db, notify_db_session):
user = User(email_address='PendingUser@example.gov.uk',
password='val1dPassw0rd!',
mobile_number='+441234123123',
name='pending user',
created_at=datetime.now(),
role_id=1,
state='pending')
users_dao.insert_user(user)
response = notifications_admin.test_client().post('/sign-in',
data={'email_address': 'PendingUser@example.gov.uk',
'password': 'val1dPassw0rd!'})
assert response.status_code == 401
assert '"active_user": false' in response.get_data(as_text=True)
def _set_up_mocker(mocker): def _set_up_mocker(mocker):
mocker.patch("app.admin_api_client.send_sms") mocker.patch("app.admin_api_client.send_sms")
mocker.patch("app.admin_api_client.send_email") mocker.patch("app.admin_api_client.send_email")

View File

@@ -13,7 +13,7 @@ def test_should_render_two_factor_page(notifications_admin, notifications_admin_
def test_should_login_user_and_redirect_to_dashboard(notifications_admin, notifications_admin_db, notify_db_session): def test_should_login_user_and_redirect_to_dashboard(notifications_admin, notifications_admin_db, notify_db_session):
with notifications_admin.test_client() as client: with notifications_admin.test_client() as client:
with client.session_transaction() as session: with client.session_transaction() as session:
user = create_test_user() user = create_test_user('active')
session['user_id'] = user.id session['user_id'] = user.id
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms') verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms')
response = client.post('/two-factor', response = client.post('/two-factor',
@@ -28,7 +28,7 @@ def test_should_return_400_with_sms_code_error_when_sms_code_is_wrong(notificati
notify_db_session): notify_db_session):
with notifications_admin.test_client() as client: with notifications_admin.test_client() as client:
with client.session_transaction() as session: with client.session_transaction() as session:
user = create_test_user() user = create_test_user('active')
session['user_id'] = user.id session['user_id'] = user.id
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms') verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms')
response = client.post('/two-factor', response = client.post('/two-factor',

View File

@@ -14,7 +14,7 @@ def test_should_redirect_to_add_service_when_code_are_correct(notifications_admi
notify_db_session): notify_db_session):
with notifications_admin.test_client() as client: with notifications_admin.test_client() as client:
with client.session_transaction() as session: with client.session_transaction() as session:
user = create_test_user() user = create_test_user('pending')
session['user_id'] = user.id session['user_id'] = user.id
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms') verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms')
verify_codes_dao.add_code(user_id=user.id, code='23456', code_type='email') verify_codes_dao.add_code(user_id=user.id, code='23456', code_type='email')
@@ -28,7 +28,7 @@ def test_should_redirect_to_add_service_when_code_are_correct(notifications_admi
def test_should_activate_user_after_verify(notifications_admin, notifications_admin_db, notify_db_session): def test_should_activate_user_after_verify(notifications_admin, notifications_admin_db, notify_db_session):
with notifications_admin.test_client() as client: with notifications_admin.test_client() as client:
with client.session_transaction() as session: with client.session_transaction() as session:
user = create_test_user() user = create_test_user('pending')
session['user_id'] = user.id session['user_id'] = user.id
verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms') verify_codes_dao.add_code(user_id=user.id, code='12345', code_type='sms')
verify_codes_dao.add_code(user_id=user.id, code='23456', code_type='email') verify_codes_dao.add_code(user_id=user.id, code='23456', code_type='email')
@@ -43,7 +43,7 @@ def test_should_activate_user_after_verify(notifications_admin, notifications_ad
def test_should_return_400_when_codes_are_wrong(notifications_admin, notifications_admin_db, notify_db_session): def test_should_return_400_when_codes_are_wrong(notifications_admin, notifications_admin_db, notify_db_session):
with notifications_admin.test_client() as client: with notifications_admin.test_client() as client:
with client.session_transaction() as session: with client.session_transaction() as session:
user = create_test_user() user = create_test_user('pending')
session['user_id'] = user.id session['user_id'] = user.id
verify_codes_dao.add_code(user_id=user.id, code='23345', code_type='sms') verify_codes_dao.add_code(user_id=user.id, code='23345', code_type='sms')
verify_codes_dao.add_code(user_id=user.id, code='98456', code_type='email') verify_codes_dao.add_code(user_id=user.id, code='98456', code_type='email')