Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 529194a2 authored by Ronak Patel's avatar Ronak Patel
Browse files

Added changes

parent 9b6c5180
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
		<personal-section>OCA\EcloudAccounts\Settings\BetaSection</personal-section>
	</settings>
    <commands>
        <command>OCA\EcloudAccounts\Command\MigrateBlacklistedDomains</command>
        <command>OCA\EcloudAccounts\Command\UpdateBlacklistedDomains</command>
        <command>OCA\EcloudAccounts\Command\Migrate2FASecrets</command>
        <command>OCA\EcloudAccounts\Command\MigrateWebmailAddressbooks</command>
    </commands>
+2 −2
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class MigrateBlacklistedDomains extends Command {
class UpdateBlacklistedDomains extends Command {
	private UserService $userService;

	public function __construct(UserService $userService) {
@@ -19,7 +19,7 @@ class MigrateBlacklistedDomains extends Command {
	}

	protected function configure() {
		$this->setName(Application::APP_ID.':migrate-blacklisted-domains')->setDescription('Migrate blacklisted domains');
		$this->setName(Application::APP_ID.':update-blacklisted-domains')->setDescription('Update blacklisted domains');
	}

	protected function execute(InputInterface $input, OutputInterface $output): int {
+1 −4
Original line number Diff line number Diff line
@@ -296,10 +296,7 @@ class UserService {
		$emailDomain = strtolower(end($emailParts));
		
		// Check if the email domain is in the blacklisted domains array
		if (in_array($emailDomain, $blacklistedDomains)) {
			return true; // Email domain is blacklisted
		}
		return false; // Email domain is not blacklisted
		return in_array($emailDomain, $blacklistedDomains);
	}
	/**
	 * Add a new user to the LDAP directory.