-
Notifications
You must be signed in to change notification settings - Fork 0
fix: use integer values for f:be.infobox state for v13 compatibility #93
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -9,12 +9,12 @@ <h1><f:translate key="LLL:EXT:nr_vault/Resources/Private/Language/locallang_mod. | |||||
|
|
||||||
| <f:if condition="{valid}"> | ||||||
| <f:then> | ||||||
| <f:be.infobox title="{f:translate(key: 'LLL:EXT:nr_vault/Resources/Private/Language/locallang_mod.xlf:audit.chain_valid')}" state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::OK')}"> | ||||||
| <f:be.infobox title="{f:translate(key: 'LLL:EXT:nr_vault/Resources/Private/Language/locallang_mod.xlf:audit.chain_valid')}" state="0"> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve maintainability and avoid using a magic number, you can access the integer value from the enum constant directly. This approach is compatible with TYPO3 v13+ and makes the code's intent clearer.
Suggested change
|
||||||
| The audit log hash chain has been verified successfully. No tampering or modifications have been detected. | ||||||
| </f:be.infobox> | ||||||
| </f:then> | ||||||
| <f:else> | ||||||
| <f:be.infobox title="{f:translate(key: 'LLL:EXT:nr_vault/Resources/Private/Language/locallang_mod.xlf:audit.chain_invalid')}" state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::ERROR')}"> | ||||||
| <f:be.infobox title="{f:translate(key: 'LLL:EXT:nr_vault/Resources/Private/Language/locallang_mod.xlf:audit.chain_invalid')}" state="2"> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve maintainability and avoid using a magic number, you can access the integer value from the enum constant directly. This approach is compatible with TYPO3 v13+ and makes the code's intent clearer.
Suggested change
|
||||||
| Hash chain verification failed. The audit log may have been tampered with. | ||||||
| </f:be.infobox> | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -25,7 +25,7 @@ <h2>Step 3: Configure Migration</h2> | |||||
| </p> | ||||||
|
|
||||||
| <form method="post" action="{f:be.uri(route: 'admin_vault_migration', parameters: '{action: \'execute\'}')}"> | ||||||
| <f:be.infobox title="Database Modification" state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::WARNING')}"> | ||||||
| <f:be.infobox title="Database Modification" state="1"> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve maintainability and avoid using a magic number, you can access the integer value from the enum constant directly. This approach is compatible with TYPO3 v13+ and makes the code's intent clearer.
Suggested change
|
||||||
| <strong>Warning:</strong> This will modify your database. Make sure you have a backup before proceeding. | ||||||
| </f:be.infobox> | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -77,7 +77,7 @@ <h3 class="card-title">Known API Key Formats</h3> | |||||
| </div> | ||||||
|
|
||||||
| <!-- Important Notes --> | ||||||
| <f:be.infobox title="Important Notes" state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::WARNING')}"> | ||||||
| <f:be.infobox title="Important Notes" state="1"> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve maintainability and avoid using a magic number, you can access the integer value from the enum constant directly. This approach is compatible with TYPO3 v13+ and makes the code's intent clearer.
Suggested change
|
||||||
| <ul class="mb-0"> | ||||||
| <li><strong>Backup first</strong> - Always create a database backup before running migrations.</li> | ||||||
| <li><strong>Test environment</strong> - Run the scan on a test system first to review what will be detected.</li> | ||||||
|
|
@@ -86,7 +86,7 @@ <h3 class="card-title">Known API Key Formats</h3> | |||||
| </ul> | ||||||
| </f:be.infobox> | ||||||
|
|
||||||
| <f:be.infobox title="Configuration Secrets" state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::INFO')}"> | ||||||
| <f:be.infobox title="Configuration Secrets" state="-1"> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve maintainability and avoid using a magic number, you can access the integer value from the enum constant directly. This approach is compatible with TYPO3 v13+ and makes the code's intent clearer.
Suggested change
|
||||||
| Configuration secrets (in <code>LocalConfiguration.php</code> or extension settings) are detected but must be migrated manually. | ||||||
| Replace the value with <code>%vault(identifier)%</code> after storing the secret in the vault. | ||||||
| </f:be.infobox> | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -28,7 +28,7 @@ <h2>Step 2: Review and Select Secrets</h2> | |||||
| <f:if condition="{secrets -> f:count()} > 0"> | ||||||
| <f:then> | ||||||
| <form method="post" action="{f:be.uri(route: 'admin_vault_migration', parameters: '{action: \'configure\'}')}"> | ||||||
| <f:be.infobox title="Database Secrets Only" state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::INFO')}"> | ||||||
| <f:be.infobox title="Database Secrets Only" state="-1"> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve maintainability and avoid using a magic number, you can access the integer value from the enum constant directly. This approach is compatible with TYPO3 v13+ and makes the code's intent clearer.
Suggested change
|
||||||
| Only database secrets can be migrated via this wizard. | ||||||
| Configuration secrets need to be updated manually to use <code>%vault(identifier)%</code> references. | ||||||
| </f:be.infobox> | ||||||
|
|
@@ -124,7 +124,7 @@ <h2>Step 2: Review and Select Secrets</h2> | |||||
| </f:asset.script> | ||||||
| </f:then> | ||||||
| <f:else> | ||||||
| <f:be.infobox title="No Database Secrets Found" state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::WARNING')}"> | ||||||
| <f:be.infobox title="No Database Secrets Found" state="1"> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve maintainability and avoid using a magic number, you can access the integer value from the enum constant directly. This approach is compatible with TYPO3 v13+ and makes the code's intent clearer.
Suggested change
|
||||||
| No database secrets were found to migrate. The scan may have detected only configuration secrets, | ||||||
| which must be migrated manually by updating your configuration to use <code>%vault(identifier)%</code> references. | ||||||
| </f:be.infobox> | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -149,14 +149,14 @@ <h3> | |||||
| </f:if> | ||||||
| </div> | ||||||
| <f:if condition="{configCount} && !{databaseCount}"> | ||||||
| <f:be.infobox title="No Database Secrets to Migrate" state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::INFO')}"> | ||||||
| <f:be.infobox title="No Database Secrets to Migrate" state="-1"> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve maintainability and avoid using a magic number, you can access the integer value from the enum constant directly. This approach is compatible with TYPO3 v13+ and makes the code's intent clearer.
Suggested change
|
||||||
| Only configuration secrets were detected. These must be migrated manually by updating your configuration | ||||||
| to use <code>%vault(identifier)%</code> references. See the documentation for details. | ||||||
| </f:be.infobox> | ||||||
| </f:if> | ||||||
| </f:then> | ||||||
| <f:else> | ||||||
| <f:be.infobox title="No Plaintext Secrets Detected" state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::OK')}"> | ||||||
| <f:be.infobox title="No Plaintext Secrets Detected" state="0"> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve maintainability and avoid using a magic number, you can access the integer value from the enum constant directly. This approach is compatible with TYPO3 v13+ and makes the code's intent clearer.
Suggested change
|
||||||
| Great! No potential plaintext secrets were found in your database or configuration. | ||||||
| Your sensitive data appears to be properly protected. | ||||||
| </f:be.infobox> | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -98,7 +98,7 @@ <h2>Migration Details</h2> | |||||
| </div> | ||||||
|
|
||||||
| <f:if condition="{clearOriginals}"> | ||||||
| <f:be.infobox title="Database Updated" state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::INFO')}"> | ||||||
| <f:be.infobox title="Database Updated" state="-1"> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve maintainability and avoid using a magic number, you can access the integer value from the enum constant directly. This approach is compatible with TYPO3 v13+ and makes the code's intent clearer.
Suggested change
|
||||||
| Original plaintext values have been replaced with vault identifiers in the database. | ||||||
| </f:be.infobox> | ||||||
| </f:if> | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -276,7 +276,7 @@ <h3 class="card-title h5"> | |||||
| </div> | ||||||
|
|
||||||
| <!-- Documentation Link --> | ||||||
| <f:be.infobox title="Documentation" state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::INFO')}"> | ||||||
| <f:be.infobox title="Documentation" state="-1"> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve maintainability and avoid using a magic number, you can access the integer value from the enum constant directly. This approach is compatible with TYPO3 v13+ and makes the code's intent clearer.
Suggested change
|
||||||
| For detailed information, see the | ||||||
| <a href="https://docs.typo3.org/p/netresearch/nr-vault/main/en-us/" target="_blank" rel="noopener" class="text-decoration-underline"> | ||||||
| extension documentation | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -174,7 +174,7 @@ <h1><f:translate key="LLL:EXT:nr_vault/Resources/Private/Language/locallang_mod. | |||||
| </div> | ||||||
| </f:then> | ||||||
| <f:else> | ||||||
| <f:be.infobox title="No Secrets Found" state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::INFO')}"> | ||||||
| <f:be.infobox title="No Secrets Found" state="-1"> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve maintainability and avoid using a magic number, you can access the integer value from the enum constant directly. This approach is compatible with TYPO3 v13+ and makes the code's intent clearer.
Suggested change
|
||||||
| <f:translate key="LLL:EXT:nr_vault/Resources/Private/Language/locallang_mod.xlf:secrets.empty" /> | ||||||
| </f:be.infobox> | ||||||
| </f:else> | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve maintainability and avoid using a magic number, you can access the integer value from the enum constant directly. This approach is compatible with TYPO3 v13+ and makes the code's intent clearer.