Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

universal logging to administration of public demoshop #68

Merged
merged 2 commits into from
Aug 19, 2019

Conversation

TomasLudvik
Copy link
Member

Q A
Description, reason for the PR On public demoshop we need to have administrator, that cannot be changed or deleted so users can always log into administration with same credentials. Also we need to enable multiple users to log with same credentials.
New feature Yes
Fixes issues ...
Have you read and signed our License Agreement for contributions? Yes

@TomasLudvik TomasLudvik force-pushed the tl-administrator-logging branch from 3ab59d5 to 1127f53 Compare August 15, 2019 11:01
Copy link
Contributor

@s3tezsky s3tezsky left a comment

Choose a reason for hiding this comment

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

Seems OK to me except AdministratorUserProvider where I left a comment.

Anyway that class could be a bit refactored in framework to prevent unnecesary code duplication but it is not part of this PR.

Copy link
Member

@grossmannmartin grossmannmartin left a comment

Choose a reason for hiding this comment

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

Hi @TomasLudvik, @s3tezsky
I check the PR and have just small objections.
And I saw you deleted back the overriden menu related controller/template. Why?

Looking forward to testing :)

@@ -28,3 +28,4 @@ parameters:
Shopsys\FrameworkBundle\Model\Transport\Transport: Shopsys\ShopBundle\Model\Transport\Transport
Shopsys\FrameworkBundle\Model\Customer\BillingAddress: Shopsys\ShopBundle\Model\Customer\BillingAddress
Shopsys\FrameworkBundle\Model\Customer\User: Shopsys\ShopBundle\Model\Customer\User
Shopsys\FrameworkBundle\Model\Administrator\Administrator: Shopsys\ShopBundle\Model\Administrator\Administrator
Copy link
Member

Choose a reason for hiding this comment

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

what about \Tests\ShopBundle\Functional\EntityExtension\EntityExtensionTest?
Currently, this entity is not used in tests and it could be surprising in the future

Copy link
Member Author

Choose a reason for hiding this comment

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

That tests uses extension map and then adds some entities that it uses.

Copy link
Member

Choose a reason for hiding this comment

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

Okay, that's valid, thanks.

But then the tests should be fixed, don't they? I'm talking for example about AdministratorRepositoryTest, where
$administrator is annotated as a Framework entity.
I know that in this test it doesn't matter (no extra fields are used), but couldn't it be confusing in the future?

Copy link
Member Author

Choose a reason for hiding this comment

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

Well we do not do that. @vitek-rostislav is just implementing fixer for updating annotations, so maybe he will solve this.

Copy link
Member

Choose a reason for hiding this comment

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

Okay, I don't agree with "we don't do that", but fixer in progress is a strong enough argument to keep me in peace 😄

src/Shopsys/ShopBundle/Resources/config/services.yml Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
@TomasLudvik TomasLudvik force-pushed the tl-administrator-logging branch from 3251f44 to 1ee9aa8 Compare August 16, 2019 11:05
Copy link
Member

@grossmannmartin grossmannmartin left a comment

Choose a reason for hiding this comment

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

TESTS

Everything works as expected. I just added a few more notes, please check it out.

And one thing – Grid limit (Items per page) is shared between two logged admins (admin one set limit to 200, second admin refresh page and see 200 entries too). Not sure if it's in the scope of this PR.

@@ -28,3 +28,4 @@ parameters:
Shopsys\FrameworkBundle\Model\Transport\Transport: Shopsys\ShopBundle\Model\Transport\Transport
Shopsys\FrameworkBundle\Model\Customer\BillingAddress: Shopsys\ShopBundle\Model\Customer\BillingAddress
Shopsys\FrameworkBundle\Model\Customer\User: Shopsys\ShopBundle\Model\Customer\User
Shopsys\FrameworkBundle\Model\Administrator\Administrator: Shopsys\ShopBundle\Model\Administrator\Administrator
Copy link
Member

Choose a reason for hiding this comment

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

Okay, that's valid, thanks.

But then the tests should be fixed, don't they? I'm talking for example about AdministratorRepositoryTest, where
$administrator is annotated as a Framework entity.
I know that in this test it doesn't matter (no extra fields are used), but couldn't it be confusing in the future?

@TomasLudvik TomasLudvik force-pushed the tl-administrator-logging branch from 3bc0683 to fefd2b0 Compare August 19, 2019 07:01
@TomasLudvik TomasLudvik merged commit 9bfc447 into master Aug 19, 2019
@TomasLudvik TomasLudvik deleted the tl-administrator-logging branch August 19, 2019 07:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants