Skip to content

Commit

Permalink
Merge pull request #4254 from LibreSign/backport/4239/stable29
Browse files Browse the repository at this point in the history
[stable29] feat: validate from uploaded file
  • Loading branch information
vitormattos authored Jan 10, 2025
2 parents ff269c5 + f057a6e commit aa92e9d
Show file tree
Hide file tree
Showing 45 changed files with 2,449 additions and 414 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/behat-mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ jobs:
# Split and keep last
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Install system dependencies
run: sudo apt install poppler-utils

- name: Checkout server
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/behat-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ jobs:
# Split and keep last
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Install system dependencies
run: sudo apt install poppler-utils

- name: Checkout server
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/behat-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ jobs:
# Split and keep last
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Install system dependencies
run: sudo apt install poppler-utils

- name: Checkout server
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/behat-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ jobs:
# Split and keep last
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Install system dependencies
run: sudo apt install poppler-utils

- name: Checkout server
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/phpunit-mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ jobs:
# Split and keep last
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Install system dependencies
run: sudo apt install poppler-utils

- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/phpunit-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ jobs:
# Split and keep last
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Install system dependencies
run: sudo apt install poppler-utils

- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/phpunit-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ jobs:
# Split and keep last
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Install system dependencies
run: sudo apt install poppler-utils

- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/phpunit-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ jobs:
# Split and keep last
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Install system dependencies
run: sudo apt install poppler-utils

- name: Checkout server
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Developed with ❤️ by [LibreCode](https://librecode.coop). Help us transform
* [Donate with GitHub Sponsor: ![Donate using GitHub Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/libresign)
]]></description>
<version>9.7.4</version>
<version>9.8.0</version>
<licence>agpl</licence>
<author mail="[email protected]" homepage="https://librecode.coop">LibreCode</author>
<documentation>
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"mikehaertl/php-pdftk": "^0.13.0",
"mpdf/mpdf": "^8.2",
"pagerfanta/pagerfanta": "^3.6",
"phpseclib/phpseclib": "^3.0",
"smalot/pdfparser": "^2.4",
"wobeto/email-blur": "^1.0"
},
Expand Down
188 changes: 183 additions & 5 deletions composer.lock

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

13 changes: 12 additions & 1 deletion lib/Command/Configure/Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int

if (count($result)) {
$table = new Table($output);
$table->setColumnMaxWidth(3, 40);
foreach ($result as $row) {
$table->addRow([
new TableCell($row->getStatus(), ['style' => new TableCellStyle([
'bg' => $row->getStatus() === 'success' ? 'green' : 'red',
'bg' => $this->getStatusColor($row->getStatus()),
'fg' => 'black',
'align' => 'center',
])]),
$row->getResource(),
Expand All @@ -105,4 +107,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}
return 0;
}

private function getStatusColor($status): string {
return match ($status) {
'success' => 'green',
'error' => 'red',
'info' => 'bright-yellow',
default => 'red',
};
}
}
Loading

0 comments on commit aa92e9d

Please sign in to comment.