Skip to content

Commit

Permalink
chore: temporary remove support to TwoFactorGateway
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Mar 28, 2024
1 parent 025b71d commit 61fbb86
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/behat-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,4 @@ jobs:

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-mysql.result != 'success' }}; then exit 1; fi
run: if ${{ needs.changes.outputs.src != 'false' && needs.behat-mysql.result != 'success' }}; then exit 1; fi
8 changes: 4 additions & 4 deletions .github/workflows/phpunit-mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ jobs:
./occ --version
./occ app:enable --force ${{ env.APP_NAME }}
- name: Set up dependencies apps
run: |
./occ app:install --force --keep-disabled twofactor_gateway
./occ app:enable --force twofactor_gateway
# - name: Set up dependencies apps
# run: |
# ./occ app:install --force --keep-disabled twofactor_gateway
# ./occ app:enable --force twofactor_gateway

- name: Run Nextcloud
run: php -S localhost:8080 &
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/phpunit-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ jobs:
./occ --version
./occ app:enable --force ${{ env.APP_NAME }}
- name: Set up dependencies apps
run: |
./occ app:install --force --keep-disabled twofactor_gateway
./occ app:enable --force twofactor_gateway
# - name: Set up dependencies apps
# run: |
# ./occ app:install --force --keep-disabled twofactor_gateway
# ./occ app:enable --force twofactor_gateway

- name: Run Nextcloud
run: php -S localhost:8080 &
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/phpunit-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ jobs:
./occ --version
./occ app:enable --force ${{ env.APP_NAME }}
- name: Set up dependencies apps
run: |
./occ app:install --force --keep-disabled twofactor_gateway
./occ app:enable --force twofactor_gateway
# - name: Set up dependencies apps
# run: |
# ./occ app:install --force --keep-disabled twofactor_gateway
# ./occ app:enable --force twofactor_gateway

- name: Run Nextcloud
run: php -S localhost:8080 &
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/phpunit-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ jobs:
./occ --version
./occ app:enable --force ${{ env.APP_NAME }}
- name: Set up dependencies apps
run: |
./occ app:install --force --keep-disabled twofactor_gateway
./occ app:enable --force twofactor_gateway
# - name: Set up dependencies apps
# run: |
# ./occ app:install --force --keep-disabled twofactor_gateway
# ./occ app:enable --force twofactor_gateway

- name: Run Nextcloud
run: php -S localhost:8080 &
Expand Down
9 changes: 4 additions & 5 deletions lib/Controller/SignFileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
use OCA\Libresign\Service\FileService;
use OCA\Libresign\Service\IdentifyMethodService;
use OCA\Libresign\Service\SignFileService;
use OCA\TwoFactorGateway\Exception\SmsTransmissionException;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
Expand Down Expand Up @@ -212,10 +211,10 @@ private function getCode(string $uuid = null, int $fileId = null): JSONResponse
);
$message = $this->l10n->t('The code to sign file was successfully requested.');
$statusCode = Http::STATUS_OK;
} catch (SmsTransmissionException $e) {
// There was an error when to send SMS code to user.
$message = $this->l10n->t('Failed to send code.');
$statusCode = Http::STATUS_UNPROCESSABLE_ENTITY;
// } catch (\OCA\TwoFactorGateway\Exception\SmsTransmissionException $e) {
// // There was an error when to send SMS code to user.
// $message = $this->l10n->t('Failed to send code.');
// $statusCode = Http::STATUS_UNPROCESSABLE_ENTITY;
} catch (\Throwable $th) {
$message = $th->getMessage();
$statusCode = Http::STATUS_UNPROCESSABLE_ENTITY;
Expand Down

0 comments on commit 61fbb86

Please sign in to comment.