Skip to content

Commit

Permalink
Merge branch 'main' of github.com:in2code-de/femanager
Browse files Browse the repository at this point in the history
  • Loading branch information
sbusemann committed Nov 11, 2024
2 parents 7e11c4b + 370a8c6 commit f589a93
Show file tree
Hide file tree
Showing 13 changed files with 159 additions and 65 deletions.
65 changes: 33 additions & 32 deletions .FemanagerFeaturesList.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,42 @@
## Funktionen

### Frontend-User Registration
| Feature | State in TYPO3v12 |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|
| One step registration with autologin | not working |
| Main configuration with Flexform | working |
| User confirmation (Double-Opt In) (optional) | working |
| Administration confirmation (optional) | working |
| Refuse and Silent Refuse | working |
| Fill email field with username (optional) | working |
| Redirect with TypoScript standardWrap (optional) | working |
| Prefill Formfields via TypoScript standardWrap (optional) | working |
| Multiple Validation Possibilities (JavaScript and PHP) (required, email, min, max, intOnly, lettersOnly, unicodeLettersOnly, uniqueInPage, uniqueInDb, mustInclude(number,letter,special), inList(1,2,3)) | working |
| Same PHP Methods for JavaScript and PHP Validation | working |
| Simply extend validation methods with your extension | working |
| Override a lot of Email settings with TypoScript if needed | working |
| Set mail attachments or embeded images | working |
| Override field values on every single step (e.g. push user to usergroup1 and if he is ready confimed push him to usergroup2) | working |
| Send user values to a third party software (e.g. a CRM like salesforce) | working |
| Store values in other database tables (e.g. tt_address) | working |
| Add Captcha (sr_freecap) for spam prevention | cannot be tested at the moment |
| Feature | State in TYPO3v12 |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|
| One step registration with autologin | working |
| Main configuration with Flexform | working |
| User confirmation (Double-Opt In) (optional) | working |
| Administration confirmation (optional) | working |
| Refuse and Silent Refuse | working |
| Fill email field with username (optional) | working |
| Redirect with TypoScript standardWrap (optional) | working |
| Prefill Formfields via TypoScript standardWrap (optional) | working |
| Multiple Validation Possibilities (JavaScript and PHP) (required, email, min, max, intOnly, lettersOnly, unicodeLettersOnly, uniqueInPage, uniqueInDb, mustInclude(number,letter,special), inList(1,2,3)) | working |
| Same PHP Methods for JavaScript and PHP Validation | working |
| Simply extend validation methods with your extension | working |
| Override a lot of Email settings with TypoScript if needed | working |
| Set mail attachments or embeded images | working |
| Override field values on every single step (e.g. push user to usergroup1 and if he is ready confimed push him to usergroup2) | working |
| Send user values to a third party software (e.g. a CRM like salesforce) | working |
| Store values in other database tables (e.g. tt_address) | working |
| Add Captcha (sr_freecap) for spam prevention | not tested |

### Edit Profile

| Feature | State in TYPO3v12 |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|
| Main configuration with Flexform | worming |
| Administration confirmation for change request (optional) | working |
| Refuse and Silent Refuse | working |
| Fill email field with username (optional) | working |
| Prefill Formfields via TypoScript standardWrap (optional) | working |
| Multiple Validation Possibilities (JavaScript and PHP) (required, email, min, max, intOnly, lettersOnly, unicodeLettersOnly, uniqueInPage, uniqueInDb, mustInclude(number,letter,special), inList(1,2,3)) | working |
| Same PHP Methods for JavaScript and PHP Validation | working |
| Simply extend validation methods with your extension | working |
| Override a lot of Email settings with TypoScript if needed | working |
| Set mail attachments or embeded images | working |
| Delete profile with TypoScript redirect | working |
| Feature | State in TYPO3v12 | Testcase URL |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|------------------------------------------------------|
| Main configuration with Flexform | worming | |
| Administration confirmation for change request (optional) | working | |
| Refuse and Silent Refuse | working | |
| Fill email field with username (optional) | working | |
| Prefill Formfields via TypoScript standardWrap (optional) | working | |
| Multiple Validation Possibilities (JavaScript and PHP) (required, email, min, max, intOnly, lettersOnly, unicodeLettersOnly, uniqueInPage, uniqueInDb, mustInclude(number,letter,special), inList(1,2,3)) | working | |
| Same PHP Methods for JavaScript and PHP Validation | working | |
| Simply extend validation methods with your extension | working | |
| Override a lot of Email settings with TypoScript if needed | working | |
| Set mail attachments or embeded images | working | |
| Delete profile with TypoScript redirect | working | |
| Notify Admin on changes | working | https://femanager8.ddev.site/edit/small/admin-notify |

### Invitation

Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
- uses: ddev/github-action-setup-ddev@v1
- name: "Composer Install"
run: "composer install"
- name: "Run PHP Rector"
run: "composer test:rector"
run: "ddev composer install"
- name: "Initialize TYPO3 in ddev"
run: "ddev initialize"
- name: "Run Behat Tests"
run: "ddev composer test:rector"
unit-tests:
name: "PHP Unit Tests"
runs-on: ubuntu-20.04
Expand Down
7 changes: 4 additions & 3 deletions Classes/Controller/AbstractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ public function updateAllConfirmed(User $user)
'updateNotify',
StringUtility::makeEmailArray(
ConfigurationUtility::getValue(
'edit/email/createUserNotify/notifyAdmin/receiver/email/value',
'edit./email./notifyAdmin./receiver./email./value',
$this->config
) ?: ConfigurationUtility::getValue('edit/notifyAdmin', $this->config),
) ?: ConfigurationUtility::getValue('edit./notifyAdmin', $this->config),
$this->settings['edit']['email']['notifyAdmin']['receiver']['name']['value'] ?? null
),
StringUtility::makeEmailArray($user->getEmail(), $user->getUsername()),
Expand Down Expand Up @@ -367,7 +367,8 @@ public function finalCreate(
$this->sendMailService->send(
'createNotify',
StringUtility::makeEmailArray(
$createAdminNotify
$createAdminNotify,
ConfigurationUtility::getValue('new./email./createAdminNotify./receiver./name./value', $this->config) ?? 'femanager'
),
StringUtility::makeEmailArray($user->getEmail(), $user->getUsername()),
$this->contentObject->cObjGetSingle(
Expand Down
2 changes: 1 addition & 1 deletion Classes/Controller/EditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function deleteAction(User $user)
*/
protected function redirectIfNoChangesOnObject(User $user)
{
if (!ObjectUtility::isDirtyObject($user)) {
if (!ObjectUtility::isDirtyObject($user, $this->request)) {
$this->addFlashMessage(LocalizationUtility::translate('noChanges'), '', ContextualFeedbackSeverity::NOTICE);
return $this->redirect('edit');
}
Expand Down
6 changes: 3 additions & 3 deletions Classes/Controller/UserBackendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ private function checkPageAndUserAccess($user): bool
$pageRepository = GeneralUtility::makeInstance(PageRepository::class);
$pageRow = $pageRepository->getPage($user->getPid());
if ($GLOBALS['BE_USER']->doesUserHaveAccess(
$pageRow,
Permission::PAGE_SHOW
) === false) {
$pageRow,
Permission::PAGE_SHOW
) === false) {
return false;
}
}
Expand Down
1 change: 0 additions & 1 deletion Classes/Controller/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Psr\Http\Message\ResponseInterface;
use TYPO3\CMS\Core\Error\Http\UnauthorizedException;
use TYPO3\CMS\Core\Http\RedirectResponse;
use TYPO3\CMS\Core\Site\SiteFinder;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;

Expand Down
4 changes: 1 addition & 3 deletions Classes/Domain/Validator/AbstractValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use TYPO3\CMS\Core\Http\ApplicationType;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Utility\DebuggerUtility;
use TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator as AbstractValidatorExtbase;

/**
Expand Down Expand Up @@ -120,8 +119,7 @@ protected function validateFileRequired(mixed $value, string $fieldName): bool
if (isset($uploadedFiles[$this->pluginService->getFemanagerPluginNameFromRequest()][$fieldName])) {
return true;
}
}
else {
} else {
return $this->validateRequired($value);
}
return false;
Expand Down
Loading

0 comments on commit f589a93

Please sign in to comment.