-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "MFA Verified" check to workflowengine #37914
Closed
Closed
Changes from 6 commits
Commits
Show all changes
782 commits
Select commit
Hold shift + click to select a range
4811a02
Merge pull request #38329 from nextcloud/pulsejet/patch-webpack
skjnldsv 4220442
Merge pull request #37458 from Fenn-CS/fix/37424/better-501-error-log…
Fenn-CS 60a7610
webpack: add nonce to unsupported-browser-redirect chunk
pulsejet b2e3426
Merge pull request #38415 from nextcloud/object-store-init-root
blizzz e603826
Merge pull request #38374 from nextcloud/pulsejet/patch-ubr-nonce
pulsejet 4218f71
Add OpenAPI specs
provokateurin d9f9a72
fix(files): make open folder a default action
skjnldsv 115689f
Merge pull request #38438 from nextcloud/feature/openapi/specs
provokateurin b8ae166
Merge pull request #38441 from nextcloud/feat/make-open-folder-action
AndyScherzinger 1f2a9de
Fix(l10n): Update translations from Transifex
nextcloud-bot 5cfbd4c
fix(carddav): Check enumeration settings for all SAB methods
ChristophWurst b6d7343
Merge pull request #38423 from nextcloud/fix/carddav/check-system-add…
ChristophWurst 50b61c8
fix(carddav): Make system contact phone number RFC compliant
GretaD 94e1a42
Revert "Fix table view"
JuliaKirschenheuter e524631
fix(carddav): Don't show system address book cards to guests
ChristophWurst 3d36420
Merge pull request #38458 from nextcloud/revert/37870-Fix_table_view
JuliaKirschenheuter 9780472
Merge pull request #38454 from nextcloud/fix/capitalization-other-tel
ChristophWurst 99bdb15
Adapt encryption test to change in generateHeader
come-nc cd5bd11
Merge pull request #38448 from nextcloud/fix/carddav/no-sab-guest-users
blizzz 8424b2a
adjust active element visibility in the usermenu
szaimen 0ad56e5
Merge pull request #38206 from nextcloud/fix/increase-iterations-for-…
szaimen 56aa4c7
adjust active element visibility in the sidebar
szaimen 7d06dc3
fix: better error message on missing user files dir
skjnldsv 3e293b7
Merge pull request #38459 from nextcloud/enh/noid/adjust-usermenu-vis…
szaimen cc52509
Merge pull request #38460 from nextcloud/enh/noid/adjust-sidebar-visi…
szaimen c3475f4
Fix initialisation of versions in the DB
artonge c40de8b
Improve handling of undefined version label
artonge e8eb8a9
Add fallback when a there is no preview for a version
artonge 477d644
Merge pull request #38300 from nextcloud/fix/better-error-message
szaimen f29aa29
Merge pull request #38429 from tanganellilore/fix_delete_user_syslink
szaimen fe146a9
Merge pull request #38467 from nextcloud/artonge/fix/files_versions_p…
artonge 7d9d99d
Fix(l10n): Update translations from Transifex
nextcloud-bot 9453c2d
fix: execute throws docrine exceptions not our wrapped ones
juliusknorr ef93bb9
fix(dav): Fix avatar size in system address book
nickvergessen 9fa42c0
Merge branch 'master' into artonge/fix/versions_init
artonge 37f387b
Merge pull request #38481 from nextcloud/bugfix/noid/avatar-size-in-sab
nickvergessen b4ec3a3
fix(weather_status): Improve contrast of favorite icon
susnux a3baad1
Merge pull request #38333 from nextcloud/fix/weather-star-contrast
szaimen eaff926
Fix(l10n): Update translations from Transifex
nextcloud-bot cfe923c
chore(deps-dev): Bump puppeteer from 19.10.1 to 20.4.0
dependabot[bot] b953fd7
Merge pull request #38492 from nextcloud/dependabot/npm_and_yarn/pupp…
skjnldsv fa23698
Fix(l10n): Update translations from Transifex
nextcloud-bot 0670ae6
fix: catch errors in id3parser library
kesselb 45d7cee
Fix(l10n): Update translations from Transifex
nextcloud-bot 1e1e2fe
Merge pull request #38496 from nextcloud/preview-mp3-catch-errors
szaimen 3053df7
Merge pull request #38469 from nextcloud/artonge/fix/versions_init
artonge 5b2d576
fix(docs): Fix language and copy-paste class name in docs of CSP
nickvergessen 7e7db1d
chore(deps): Drop swiftmailer/swiftmailer
ChristophWurst e25fb29
Improved display of app links
Jerome-Herbinet ec44d58
npm run build
Jerome-Herbinet 41314d3
Merge pull request #38520 from nextcloud/Jerome-Herbinet-improved-dis…
szaimen 3d1acca
chore(app): Do not clear unused cache key
ChristophWurst 6a3a040
Fix(l10n): Update translations from Transifex
nextcloud-bot 4f624b2
Update CA certificate bundle
nextcloud-command ae69a90
ci: Use conventional commits for CA bundle updates
ChristophWurst 581e5e3
Merge pull request #38537 from nextcloud/ci/cacert/conventional-commits
nickvergessen eb08dcb
Merge pull request #38534 from nextcloud/automated/noid/master-update…
nickvergessen 4746ede
Merge pull request #38513 from nextcloud/bugfix/noid/csp-doc-typos
nickvergessen b7e7d80
fix(caldav): Ignore invalid events for reminder generation
ChristophWurst 2845a04
Merge pull request #38516 from nextcloud/chore/deps/drop-swiftmailer
nickvergessen 4033154
fixup! fix(caldav): Ignore invalid events for reminder generation
ChristophWurst 716a659
Uses "Null Coalescing Operator" to improve code readability.
fsamapoor 223612b
log failures to read certificates during listing
icewind1991 315f7f2
chore: Drop app code checker test data
ChristophWurst dd2d504
chore!: Drop \OC_App::isEnabled
ChristophWurst 9a89e90
chore!: Drop \OC_Defaults::getLogoClaim
ChristophWurst 6f9ba4e
chore(libphonenumber): Bump giggsey/libphonenumber-for-php to giggsey…
nickvergessen 4809e8d
fix(CI): Satisfy psalm by removing a now obsolete type check
nickvergessen d17fd19
Fix app menu flicker
ZetaTom 496a8d2
Merge pull request #38468 from nextcloud/log-cert-list-errors
icewind1991 f0238fa
Merge pull request #38551 from nextcloud/chore/drop-oc-app-isenabled
nickvergessen 56ece0c
Merge pull request #38552 from nextcloud/chore/drop-oc-defaults-getlo…
nickvergessen 90a628d
Merge pull request #38514 from nextcloud/bump/giggsey/libphonenumber-…
nickvergessen 81463ea
Merge pull request #38549 from ZetaTom/master
szaimen 990775d
Merge pull request #38550 from nextcloud/chore/app-checker-test-data
ChristophWurst dd1f437
chore(OC): Remove deprecated legacy loader from OC (`OC.loadScript` a…
susnux aaa226d
Fix(l10n): Update translations from Transifex
nextcloud-bot 7c430a8
fix(trashbin): Truncate long filenames
Pytal 2be74ee
Merge pull request #38355 from nextcloud/fix/trashbin-long-filenames
blizzz cf6e2fa
chore: Drop \OC_App::getAppVersion
ChristophWurst e76d525
chore: Drop \OC_App::getAppInfo
ChristophWurst 167763d
chore: Drop \OC_App::getNavigation
ChristophWurst 999aec3
chore: Drop \OC_App::getSettingsNavigation
ChristophWurst 63e7ac4
Merge pull request #38301 from nextcloud/fix/carddav/catch-invalid-ev…
blizzz c52aaa3
redis: Do not try to authenticate with non-string password/user
rawtaz 1a3bb23
Merge pull request #38566 from nextcloud/chore/drop-oc-app-methods
nickvergessen 7f8f792
feat(ocp): Allow sending emails with subject and body
ChristophWurst 0f53493
fix(ocp): Mark IMessage::attachInline as @since 27
ChristophWurst 1d040f9
Merge pull request #38586 from nextcloud/fix/ocp/imessage-attachinlin…
AndyScherzinger 1ea2082
chore: Do not sass-compile external apps
ChristophWurst ff66104
Merge pull request #38567 from nextcloud/chore/remove-deprecated-lega…
ChristophWurst f04ff2c
chore(ocp)!: Drop \OCP\Util::linkToPublic
ChristophWurst e81fdfe
Merge pull request #38568 from rawtaz/fix-redis-empty-password
icewind1991 9f1d497
Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_…
icewind1991 373147a
fix(CI): Temporary workaround - Run Psalm CI with 1 thread only so it…
nickvergessen d6ce500
fix(psalm): Install apcu, ftp and ldap extension like in static-code-…
nickvergessen 07dee97
Merge pull request #38597 from nextcloud/techdebt/noid/run-psalm-ci-w…
nickvergessen 5f8fefc
chore: update workflows from templates
skjnldsv e786411
fix(CI): Update oracle image and config
nickvergessen c9fbfe2
Fix(l10n): Update translations from Transifex
nextcloud-bot 5591da0
Merge pull request #38486 from nextcloud/automated/update-workflows
nickvergessen 6d076c1
fix(dispatcher): Migrate to OCP event dispatcher before symfony/event…
nickvergessen 6793fe1
fix(CI): Add empty eslint and node when unrelated (PHP only)
nickvergessen c0263b9
Merge pull request #38585 from nextcloud/feature/ocp/send-message-wit…
ChristophWurst fa4f476
Merge pull request #38545 from nextcloud/bugfix/noid/symfony/event-di…
nickvergessen 09c5f99
Merge pull request #38593 from nextcloud/chore/ocp/drop-util-linktopu…
ChristophWurst a1ef028
Refactors "strpos" calls in /core to improve code readability.
fsamapoor b0938b9
Refactors "strpos" calls in /apps/user_ldap to improve code readability.
fsamapoor 437631a
Refactors "strpos" calls in /apps/theming to improve code readability.
fsamapoor 3d3c497
chore: remove check for suhosin.executor.func.blacklist
kesselb 438d86e
chore(deps): fix npm audit
nextcloud-command 2188505
Merge pull request #38595 from nextcloud/remove-suhosin-check
kesselb cfb921b
Refactors "strpos" calls in /apps/files_external to improve code read…
fsamapoor 12e3594
Refactors "strpos" calls in /apps/files_sharing to improve code reada…
fsamapoor d8f3387
Fix(l10n): Update translations from Transifex
nextcloud-bot 2fd7feb
Merge pull request #38497 from nextcloud/automated/noid/master-fix-np…
szaimen 8759e30
feat: set background = backgroundColor via occ
kesselb a2afc7b
refactor: migrate OC_EventSource to dependency injection
kesselb f5932eb
Merge pull request #38386 from nextcloud/dept-use-di-for-event-source
icewind1991 0357e58
Fix(l10n): Update translations from Transifex
nextcloud-bot cf75c2e
Merge pull request #38602 from fsamapoor/replace_strpos_calls_in_core
Fenn-CS 5a23b42
feat: remove check for OpenSSL 1.0.1d and 1.0.2b
kesselb 450bf5c
Refactors controllers by using PHP8's constructor property promotion.
fsamapoor 7fd9b62
Fix(l10n): Update translations from Transifex
nextcloud-bot c435722
openapi: Fix wrapping OCS responses that are not DataResponse
provokateurin e464446
Merge pull request #38640 from nextcloud/fix/openapi-ocs-wrap
AndyScherzinger 6a8c25f
Merge pull request #38608 from fsamapoor/replace_strcalls_in_user_lda…
come-nc bf38c0a
Refactors "strpos" calls in lib/public to improve code readability.
dea2f7d
Merge pull request #38620 from fsamapoor/replace_strpos_calls_in_file…
come-nc ef4226a
bump marked from 4.3.0 to 5.0.4
dependabot[bot] fbf9ac0
Merge pull request #38627 from nextcloud/dependabot/npm_and_yarn/mark…
artonge 91686e0
Merge pull request #38260 from fsamapoor/replace_strpos_calls_in_lib_…
come-nc 2e111e8
Merge pull request #38611 from fsamapoor/replace_strpos_calls_in_them…
come-nc 1d6121b
Fix contrast for inactive elements of the main navigation
JuliaKirschenheuter 94f2f57
Update apps/files_external/lib/Lib/Storage/SMB.php
fsamapoor 2713ab0
Update core/Controller/AppPasswordController.php
fsamapoor 05784c3
Update core/Controller/CollaborationResourcesController.php
fsamapoor 25cdc35
Update core/Controller/AppPasswordController.php
fsamapoor fc0e2a9
Applies agreed-upon indentation convention to the changed controllers.
fsamapoor ffa30ce
Merge pull request #38524 from nextcloud/chore/app/clear-unused-cache…
blizzz 6f3f84e
fix(caldav): Close DB cursor in reminder index background job
ChristophWurst a6a40f8
Merge pull request #38635 from nextcloud/remove-check-openssl-version
kesselb 702196d
Merge pull request #38478 from nextcloud/backport/38440/master
szaimen 8b2ec1e
Fix(l10n): Update translations from Transifex
nextcloud-bot 1d32dc8
Fix OpenAPI core paths
provokateurin 958096a
Merge pull request #38656 from nextcloud/fix/openapi-core-paths
AndyScherzinger 3846ec2
Merge pull request #38322 from nextcloud/bugfix/noid/throw-early-app-…
juliusknorr fec2cc6
Merge pull request #38649 from nextcloud/fix/caldav/close-reminder-in…
st3iny a213650
fix(caldav): Cast calendar objects id to int when building index
ChristophWurst 2264483
Disable background color on group-header line (on hover, focus, active)
Jerome-Herbinet fb945bc
npm run sass
Jerome-Herbinet d80277c
Merge pull request #38519 from nextcloud/fix/36967-increase-contrast-…
susnux 872c181
chore: Drop dead private methods in /lib
ChristophWurst f57cf47
fix: Adjust color of `icon-starred-yellow` to fulfill A11Y contrast r…
susnux 35da64a
fix(files): Add border around favorite marker to ensure contrast requ…
susnux 8673d03
Merge pull request #38652 from nextcloud/chore/dead-private-methods
ChristophWurst 9ed4040
Merge pull request #38370 from nextcloud/fix/a11y-files-favorite
susnux f96afcf
Merge pull request #38590 from nextcloud/chore/sass-no-external-apps
ChristophWurst b2a75fc
drop the oauth2_clients trusted column, delete unsupported clients an…
julien-nc 633e951
shorten oauth2 client names before resizing the column
julien-nc 4d8c963
Merge pull request #38648 from nextcloud/fix/caldav/reminder-index-in…
ChristophWurst b05c5e7
Merge pull request #38577 from nextcloud/enh/noid/improve-oauth-migra…
julien-nc fd7d0e2
Merge pull request #38631 from nextcloud/theming-set-background-color…
kesselb 27ebaea
enh(theming): Error contrast
Pytal fe098ff
enh(theming): Warning contrast
Pytal 187ff83
enh(theming): Success contrast
Pytal 27f9154
enh(theming): Info contrast
Pytal 3ef53a2
Merge pull request #38211 from nextcloud/enh/a11y-ryg-color
Pytal bf10f3c
Reset show tags on close
Pytal 5acbe6f
Show loading icon when loading tags
Pytal 5a6fb35
Merge pull request #38655 from nextcloud/fix/loading-system-tags
Pytal 80a3507
Merge pull request #38662 from nextcloud/Jerome-Herbinet-disable-bg-c…
Pytal 67f1533
Fix(l10n): Update translations from Transifex
nextcloud-bot 18c742a
encrypt oauth2 client secrets
julien-nc 5bf1fc6
Merge pull request #38398 from nextcloud/fix/noid/oauth2-encrypt-clie…
julien-nc e532419
fix(apache): Serve `mjs` (module javascript) as static files
susnux bab7cc9
fix(weather_status): Always show all favorite locations
susnux 42a1e82
Merge pull request #38688 from nextcloud/fix/serve-mjs-as-static-file
kesselb e140d2b
Merge pull request #38664 from nextcloud/fix/a11y-favorites-weather_s…
susnux df2727a
Fix(l10n): Update translations from Transifex
nextcloud-bot 7cb6a3d
fix(actions): cypress
skjnldsv 889b0c3
chore(deps-dev): Bump css-loader from 6.7.3 to 6.8.1
dependabot[bot] d889c86
chore(deps-dev): Bump tslib from 2.5.0 to 2.5.3
dependabot[bot] d682d57
Merge pull request #38694 from nextcloud/fix/cypress-context
szaimen afadf77
Update bug report issue template
solracsf 811f313
Add links
solracsf b12dc65
v25 supports php7.4
solracsf 0b88650
Remove 32bit question
solracsf ab3fed8
Merge pull request #38696 from nextcloud/dependabot/npm_and_yarn/tsli…
dependabot[bot] 9ebeb5e
Merge pull request #38695 from nextcloud/dependabot/npm_and_yarn/css-…
artonge 808819a
fix oauth2 tests
julien-nc b234b96
Do not cast sizes to int in Trashbin class
come-nc 12be9c5
Merge pull request #38700 from nextcloud/bugRepoFix
skjnldsv faf0e63
Merge pull request #38701 from nextcloud/fix/noid/oauth2-tests
kesselb 8e34153
fix false link in issue template
szaimen c4281fe
Correctly react to bad configuration
come-nc ca9d6db
Merge pull request #38710 from nextcloud/enh/noid/fix-issue-template
szaimen 2138209
chore(deps): Bump @nextcloud/vue from 7.11.6 to 7.12.0
Pytal 02a671f
Merge pull request #38715 from nextcloud/deps/nextcloud/vue-7.12.0
Pytal a719b43
Merge pull request #38703 from nextcloud/fix/trashbin-types-for-32bits
skjnldsv 3621a6b
avoid requests to opengraph image if no host detected
julien-nc 76d4487
Merge pull request #38645 from nextcloud/enh/noid/link-ref-provider-l…
juliusknorr 5b5895a
Drop meta robots tag
solracsf ea88ec1
add utility command for object store objects
icewind1991 3ef5090
Merge pull request #38226 from nextcloud/file-object-utils
icewind1991 6899360
Fix(l10n): Update translations from Transifex
nextcloud-bot e2c13ea
chore(deps-dev): Bump dms/phpunit-arraysubset-asserts
dependabot[bot] 99e1014
Merge pull request #38733 from nextcloud/dependabot/composer/build/in…
dependabot[bot] 918859c
allow to specify upgrade.cli-upgrade-link in order to link to the cor…
szaimen 0164dd0
Add a Dependabot configuration to autoupdate GitHub action versions
kurtmckee 2259eed
Fix(l10n): Update translations from Transifex
nextcloud-bot d4bebc5
chore(deps): Bump @nextcloud/event-bus from 3.0.2 to 3.1.0
dependabot[bot] 38aaab3
Merge pull request #38734 from nextcloud/dependabot/npm_and_yarn/next…
artonge a85831a
Fix(l10n): Update translations from Transifex
nextcloud-bot c93be18
Merge pull request #38543 from fsamapoor/use_null_coalescing_operator
szaimen b8c61b3
fix(caching): Avoid checking existence before fetching
ChristophWurst ac57cf9
Merge pull request #38619 from fsamapoor/replace_strpos_calls_in_file…
szaimen 1001adc
Merge pull request #38725 from nextcloud/dropMetaRobots
szaimen 08a3f37
chore(appframework)!: Drop \OCP\AppFramework\Http\EmptyContentSecurit…
ChristophWurst 0d18929
Merge pull request #38636 from fsamapoor/constructor_property_promoti…
szaimen e390a35
Merge pull request #38735 from nextcloud/enh/noid/update-disabled-upd…
szaimen 83faba5
Merge pull request #38591 from nextcloud/fix/caching/avoid-haskey-get
szaimen 63bf207
Merge pull request #38642 from nextcloud/chore/appframework/drop-empt…
szaimen 62c4196
fix(carddav): Make SystemAddressBook::__construct $groupManager argum…
ChristophWurst 8d8c865
ci: pin setup-php to avoid a regression
blizzz 7903b42
Merge pull request #38737 from kurtmckee/add-dependabot-for-actions
szaimen 874d791
chore(deps): Bump skjnldsv/read-package-engines-version-actions
dependabot[bot] acf0f16
chore(deps): Bump peter-evans/create-or-update-comment from 2 to 3
dependabot[bot] 30639c9
chore(deps): Bump actions/setup-node from 2 to 3
dependabot[bot] 89eecf9
chore(deps): Bump actions/upload-artifact from 2 to 3
dependabot[bot] ee45b13
Fix(l10n): Update translations from Transifex
nextcloud-bot 042003a
Merge pull request #38785 from nextcloud/dependabot/github_actions/sk…
skjnldsv 14ae779
Merge pull request #38788 from nextcloud/dependabot/github_actions/ac…
skjnldsv da7b407
Merge pull request #38786 from nextcloud/dependabot/github_actions/pe…
skjnldsv 46c1d97
Merge pull request #38787 from nextcloud/dependabot/github_actions/ac…
skjnldsv 39b716c
Merge pull request #38781 from nextcloud/ci/noid/pin-setup-php
skjnldsv c3ba871
Add config variable for curl timeout
dfuchss a4a5740
Changes after code review.
dfuchss e3f6a13
Fix deprecated method call
dfuchss 7f46516
Allow stdClass in XML responses
provokateurin 4b3c552
Merge pull request #38292 from dfuchss/feature/configurabe_timeout
szaimen 3f766e9
Merge pull request #38777 from nextcloud/fix/carddav/system-address-b…
ChristophWurst 38d64f4
Merge pull request #38745 from nextcloud/feature/ocs-xml-stdclass
provokateurin aedb4be
chore: don't copy additional configuration files to integration test …
kesselb 75e0461
Enable version features again with S3 versioning
bensmrs 69f6585
Merge pull request #38794 from bensmrs/master
artonge c12a64f
Fix(l10n): Update translations from Transifex
nextcloud-bot e739cc3
set correct value for two factore passed
mrvahedi68 26faee3
Merge branch 'mfa-check-final' of https://github.com/pondersource/ser…
mrvahedi68 1087ef2
rebase and fix conflicts
mrvahedi68 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?php | ||
/** | ||
* @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com> | ||
* | ||
* @author Arthur Schiwon <blizzz@arthur-schiwon.de> | ||
* @author Christoph Wurst <christoph@winzerhof-wurst.at> | ||
* @author Joas Schilling <coding@schilljs.com> | ||
* @author Julius Härtl <jus@bitgrid.net> | ||
* @author Richard Steinmetz <richard@steinmetz.cloud> | ||
* | ||
* @license GNU AGPL version 3 or any later version | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
namespace OCA\WorkflowEngine\Check; | ||
|
||
use OCP\IL10N; | ||
use OCP\WorkflowEngine\ICheck; | ||
use OCP\ISession; | ||
|
||
/** @psalm-suppress PropertyNotSetInConstructor */ | ||
class MfaVerified implements ICheck{ | ||
|
||
/** @var IL10N */ | ||
protected $l; | ||
|
||
/** @var ISession */ | ||
protected $session; | ||
|
||
/** | ||
* @param IL10N $l | ||
* @param ISession $session | ||
*/ | ||
public function __construct(IL10N $l, ISession $session) { | ||
$this->l = $l; | ||
$this->session = $session; | ||
} | ||
|
||
/** | ||
* @param string $operator | ||
* @param string $value | ||
* @return bool | ||
*/ | ||
public function executeCheck($operator, $value): bool { | ||
$mfaVerified = false; | ||
if (!empty($this->session->get('globalScale.userData'))) { | ||
$attr = $this->session->get('globalScale.userData')["userData"]; | ||
$mfaVerified = $attr["mfaVerified"]; | ||
} | ||
if (!empty($this->session->get('user_saml.samlUserData'))) { | ||
$attr = $this->session->get('user_saml.samlUserData'); | ||
$mfaVerified = $attr["mfa_verified"][0]; | ||
} | ||
if (!empty($this->session->get("two_factor_auth_passed"))){ | ||
$mfaVerified = true; | ||
} | ||
|
||
if ($operator === 'is') { | ||
return $mfaVerified === '1'; // checking whether the current user is MFA-verified | ||
} else { | ||
return $mfaVerified !== '1'; // checking whether the current user is not MFA-verified | ||
} | ||
} | ||
|
||
/** | ||
* @param string $operator | ||
* @param string $value | ||
* @throws \UnexpectedValueException | ||
*/ | ||
public function validateCheck($operator, $value): void { | ||
if (!in_array($operator, ['is', '!is'])) { | ||
throw new \UnexpectedValueException($this->l->t('The given operator is invalid'), 1); | ||
} | ||
} | ||
|
||
public function supportedEntities(): array { | ||
return []; | ||
} | ||
|
||
public function isAvailableForScope(int $scope): bool { | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
apps/workflowengine/src/components/Checks/MfaVerifiedValue.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div> | ||
<!-- Only for remove default input --> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check notice
Code scanning / Psalm
DeprecatedMethod