-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BAP-14126: User is unable to login when it is not assigned to organiz…
…… (#8951)
- Loading branch information
1 parent
da7d585
commit 141d64a
Showing
6 changed files
with
111 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/Oro/Bundle/UserBundle/Exception/OrganizationException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Oro\Bundle\UserBundle\Exception; | ||
|
||
use Symfony\Component\Security\Core\Exception\AccountStatusException; | ||
|
||
class OrganizationException extends AccountStatusException | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getMessageKey() | ||
{ | ||
return 'You don\'t have active organization assigned.'; | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
src/Oro/Bundle/UserBundle/Resources/translations/security.en.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
"Invalid credentials.": "Invalid user name or password." | ||
"Password has been changed.": "Your password was updated by administrator. You should have received an email with your new password." | ||
"You don't have active organization assigned.": "You don't have active organization assigned." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/Oro/Bundle/UserBundle/Tests/Unit/Stub/OrganizationStub.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Oro\Bundle\UserBundle\Tests\Unit\Stub; | ||
|
||
use Oro\Bundle\OrganizationBundle\Entity\Organization; | ||
|
||
class OrganizationStub extends Organization | ||
{ | ||
/** | ||
* @param int $id | ||
*/ | ||
public function setId($id) | ||
{ | ||
$this->id = $id; | ||
} | ||
} |