Skip to content

Commit

Permalink
Merge branch '5' into 6
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Jun 20, 2024
2 parents a728856 + 0aeb9f4 commit 0fa0fc2
Show file tree
Hide file tree
Showing 23 changed files with 531 additions and 858 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/add-prs-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Add new PRs to github project

on:
pull_request_target:
types:
- opened
- ready_for_review

permissions: {}

jobs:
addprtoproject:
name: Add PR to GitHub Project
# Only run on the silverstripe account
if: github.repository_owner == 'silverstripe'
runs-on: ubuntu-latest
steps:
- name: Add PR to github project
uses: silverstripe/gha-add-pr-to-project@v1
with:
app_id: ${{ vars.PROJECT_PERMISSIONS_APP_ID }}
private_key: ${{ secrets.PROJECT_PERMISSIONS_APP_PRIVATE_KEY }}
2 changes: 0 additions & 2 deletions .stylelintignore

This file was deleted.

2 changes: 1 addition & 1 deletion client/dist/styles/bundle-cms.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/dist/styles/bundle.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions client/src/bundles/bundle-cms.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
// Core variables
@import 'variables';

@import '../styles/mfa-variables';
@import '../styles/mfa';

@import '../containers/Login';

@import '../styles/mfa-variables';

// Component styles
@import '../components/FormField/RegisteredMFAMethodListField/AccountResetUI';
@import '../components/FormField/RegisteredMFAMethodListField/RegisteredMFAMethodListField';
Expand Down
1 change: 0 additions & 1 deletion client/src/bundles/bundle.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Core variables
@import 'variables';

@import '../styles/mfa-variables';

// Base style
Expand Down
1 change: 0 additions & 1 deletion client/src/components/BackupCodes/Register.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
flex-wrap: wrap;
justify-content: space-between;
max-width: 375px;

border: 1px dashed $gray-300;
font-weight: bold;

Expand Down
3 changes: 2 additions & 1 deletion client/src/components/LoadingIndicator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
animation: $loading-indicator-animation;
}

@-webkit-keyframes spinner-loader {
@keyframes spinner-loader {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
Expand All @@ -31,6 +31,7 @@
transform: rotate(360deg);
}
}

@keyframes spinner-loader {
0% {
-webkit-transform: rotate(0deg);
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Register.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

.mfa-register-confirmation {
text-align: center;
margin: 3em auto 3em;
margin: 3em auto;

&__icon {
line-height: 1;
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Register/MethodTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
border-top-right-radius: $tile-border-radius;
color: $color-tile-mask-text;
left: 0;
padding: $tile-padding/2 $tile-padding;
padding: $tile-padding / 2 $tile-padding;
position: absolute;
top: 0;
width: 100%;
Expand Down
1 change: 1 addition & 0 deletions client/src/components/Verify/SelectMethod.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@media (max-width: $viewport-medium) {
display: none;
}

height: $method-image-dimensions;
width: $method-image-dimensions;
grid-column: 2;
Expand Down
2 changes: 1 addition & 1 deletion client/src/styles/mfa-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ $color-tile-border: $color-grey-border;
$color-tile-border-hover: lighten($color-tile-border, 9.5);
$color-tile-border-active: $color-blue;
$color-tile-mask-background: #4a4a4a;
$color-tile-mask-text: white;
$color-tile-mask-text: #fff;

$dark-color-tile-border: $dark-color-grey-border;
$dark-color-tile-border-hover: rgba(255, 255, 255, 0.1);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test": "jest",
"coverage": "jest --coverage --passWithNoTests",
"lock": "npm-shrinkwrap --dev",
"lint": "eslint client/src && yarn lint-sass",
"lint": "yarn lint-js && yarn lint-sass",
"lint-js": "eslint client/src",
"lint-js-fix": "eslint client/src --fix",
"lint-sass": "stylelint client/src"
Expand All @@ -38,7 +38,7 @@
"regenerator-runtime": "^0.13.11"
},
"devDependencies": {
"@silverstripe/eslint-config": "^1.2.1",
"@silverstripe/eslint-config": "^1.3.0",
"@silverstripe/webpack-config": "^2.1.0",
"@testing-library/react": "^14.0.0",
"babel-jest": "^29.2.2",
Expand Down
4 changes: 2 additions & 2 deletions src/Authenticator/ChangePasswordHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function verifyMFACheck(HTTPRequest $request): HTTPResponse
], 202);
}

$request->getSession()->set(self::MFA_VERIFIED_ON_CHANGE_PASSWORD, true);
$request->getSession()->set(ChangePasswordHandler::MFA_VERIFIED_ON_CHANGE_PASSWORD, true);
$store->clear($request);

return $this->jsonResponse([
Expand All @@ -211,7 +211,7 @@ public function changepassword()
$hash
&& $member
&& $member->RegisteredMFAMethods()->exists()
&& !$session->get(self::MFA_VERIFIED_ON_CHANGE_PASSWORD)
&& !$session->get(ChangePasswordHandler::MFA_VERIFIED_ON_CHANGE_PASSWORD)
) {
Injector::inst()->create(StoreInterface::class, $member)->save($this->getRequest());
return $this->mfa();
Expand Down
2 changes: 1 addition & 1 deletion src/Authenticator/LoginHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ public function getMember()
* @param LoggerInterface $logger
* @return $this
*/
public function setLogger(LoggerInterface $logger): self
public function setLogger(LoggerInterface $logger): LoginHandler
{
$this->logger = $logger;
return $this;
Expand Down
Loading

0 comments on commit 0fa0fc2

Please sign in to comment.