-
Notifications
You must be signed in to change notification settings - Fork 13
✨ Add Domain Admin Settings #641
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
Conversation
e7c9755 to
22372d6
Compare
22372d6 to
95db1fa
Compare
|
|
doobry-systemli
left a comment
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.
Nice work! I stumbled upon some problems though that need to be addressed.
| And I should see text matching "Return to Index" | ||
|
|
||
| @admin | ||
| Scenario: Access to Admin Interface as Domain Admin |
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.
I like the idea to keep these tests, but would rename the scenario:
No access to Admin Interface as Domain Admin
|
|
||
| domain_settings: | ||
| title: Domain settings | ||
| intro: Here you can manage your domain settings. |
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.
Maybe better subtitle: "Manage accounts and aliases for domain example.org"?
| $this->addFlash('error', 'domain_settings.form-error'); | ||
|
|
||
| return $this->render('DomainSettings/index.html.twig', [ | ||
| 'registration' => $form->createView(), |
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.
Here the alias form view needs to be passed as well, otherwise the template throws an error because alias is unset.
| $this->addFlash('error', 'domain_settings.form-error'); | ||
|
|
||
| return $this->render('DomainSettings/index.html.twig', [ | ||
| 'alias' => $form->createView(), |
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.
Here the registration form view needs to be passed as well, otherwise the template throws an error because registration is unset.
| $this->addFlash('error', 'domain_settings.form-error'); | ||
| } | ||
|
|
||
| return $this->redirectToRoute('domain_settings'); |
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.
After a user got successfully added, we should show a (non-volatile) notification that the new user should log in and create a recovery token. Or we should create the recovery token straight away here and display it afterwards.
| $this->registrationHandler->handle($data->getEmail(), $data->getPlainPassword()); | ||
| $this->addFlash('success', 'domain_settings.registration-success'); | ||
| } catch (\Exception) { | ||
| $this->addFlash('error', 'domain_settings.form-error'); |
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.
For some reason I always get this error message, even if creating the user succeeded.
| use PlainPasswordTrait; | ||
|
|
||
| #[Assert\Email(message: 'form.invalid-email', mode: 'strict')] | ||
| #[EmailAddress] |
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.
| {{ form_start(registration) }} | ||
| {{ form_errors(registration) }} | ||
| <div class="form-group"> | ||
| {{ form_label(registration.email) }} |
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.
"Your preferred e-mail address" is a bit misleading here as label. Maybe just make it "E-mail address"? 🤔
| {{ form_widget(registration.plainPassword.second, {'attr': {'class': 'form-control input-md' }}) }} | ||
| </div> | ||
| <div class="form-group"> | ||
| {{ form_widget(registration.submit, {'attr': {'class': 'btn btn-md btn-primary btn-block' }}) }} |
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.
Here the label is "submit", while it's "Add alias address" for the alias form. Should be harmonized and become "Add e-mail address" here.
| {{ form_errors(alias) }} | ||
| <div class="form-group"> | ||
| {{ form_label(alias.alias) }} | ||
| {{ form_errors(alias.alias) }} |
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.
For some reason the errors from the alias form get displayed in the toast message instead of being displayed above the corresponding input field. For the address from it works as expected.






Added a new tile for domain admins and a corresponding view to add two essential actions: add new accounts and add new aliases.