Skip to content
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

Added blacklisting feature #9

Merged
merged 8 commits into from
Jun 22, 2016

Conversation

wachterjohannes
Copy link
Member

@wachterjohannes wachterjohannes commented Jun 17, 2016

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets none
Related issues/PRs massiveart/husky#662
License MIT
Documentation PR none

What's in this PR?

This PR adds the functionality to manage a blacklist in the sulu-admin. Each entry consists of a pattern (like *@sulu.io) and one of the following types:

  • block: an email which matches the pattern cannot be used to register a user.
  • request: an email which matches the pattern have to be confirmed by an administrator (will get an email) before the user will get the double-opt email

Why?

This should enhance the administrator to manage a blacklist of "spaming" email hosters and block specific email addresses to be reused after deleting a user.

@wachterjohannes wachterjohannes force-pushed the feature/blacklisting branch 15 times, most recently from 27784d2 to 1d6fa6c Compare June 20, 2016 14:34
$entityManager->flush();

$communityManager = $this->getCommunityManager($blacklistUser->getWebspaceKey());
$communityManager->sendEmails(Configuration::TYPE_REGISTRATION, $blacklistUser->getUser());
Copy link
Member

@alexander-schranz alexander-schranz Jun 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we maybe create here an own config type (TYPE_BLACKLIST_CONFIRM) which use the registration config as default when not set specific. or do you think it will be always the same email template?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we would send the emails by an listener on the BlacklistUser Entity it would also work when the user is denied or confirmed in an admin interface.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the admin list can only link to this controller. because we cannot confirm a user from the admin-kernel

public function putAction($id, Request $request)
{
$repository = $this->get('sulu_community.blacklisting.item_repository');
$entityManager = $this->get('doctrine.orm.entity_manager');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same would move it to a service

@wachterjohannes wachterjohannes force-pushed the feature/blacklisting branch 2 times, most recently from bdc2e57 to 0728397 Compare June 21, 2016 09:28
@wachterjohannes
Copy link
Member Author

@alexander-schranz this should be good now

@wachterjohannes wachterjohannes force-pushed the feature/blacklisting branch 2 times, most recently from 3943e41 to e91e9bb Compare June 21, 2016 11:01
@alexander-schranz
Copy link
Member

@wachterjohannes could we hide the checkbox on not created entites and sometimes when you add fast some items in the list the entities are not saved and stay as input field.

bildschirmfoto 2016-06-21 um 17 13 34

@alexander-schranz
Copy link
Member

alexander-schranz commented Jun 21, 2016

@wachterjohannes my test with [email protected] did not work. The + seems to be the problem.

@wachterjohannes
Copy link
Member Author

massiveart/husky#663 i have created an husky issue for you thought about the datagrid.

@alexander-schranz alexander-schranz merged commit c502d99 into sulu:develop Jun 22, 2016
@wachterjohannes wachterjohannes deleted the feature/blacklisting branch July 7, 2016 11:29
alexander-schranz added a commit to alexander-schranz/SuluCommunityBundle that referenced this pull request Dec 4, 2017
Fix check if template exists to send an email
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants