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

Do not set Spree.user_class after initialize if already set #171

Closed

Conversation

kennyadsl
Copy link
Member

Currently, when this class is set with a custom value using an initializer in the host application, it is not having any effect because this line is always overwriting the custom value with the default one.

Ref: #169

Currently, when this class is set with a custom value using an
initializer in the host application, it is not having any effect
because this line is always overwriting the custom value with the
default one.

Ref: solidusio#169
@kennyadsl kennyadsl self-assigned this Sep 16, 2019
@kennyadsl kennyadsl requested a review from a team September 16, 2019 15:44
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

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

Is this gem meant to be used when a custom user class is defined? I think it was never meant like this, but was meant to ship the Spree::User class.

If this fix is the only that is needed than I am ok, but what about the migrations it ships? Should we make them conditional as well?

We really should think about the purpose of this gem before making changes like this.

@kennyadsl
Copy link
Member Author

@tvdeyen I think you are right. I supposed (probably wrongly) that the user that reported the issue was using it with an existing "devise" user class. I'll ask for more info in the issue itself.

@kennyadsl kennyadsl added the WIP label Sep 17, 2019
@kennyadsl
Copy link
Member Author

Closing this one. The issue reported has more to do with solidus_reviews having solidus_auth_devise as a dependency, not allowing people to use it with a custom authentication system.

This is now fixed and this extension still is meant to be used only with Spree::User as Spree.user_class.

@kennyadsl kennyadsl closed this Sep 18, 2019
@kennyadsl kennyadsl deleted the kennyadsl/fix-custom-user-class branch September 18, 2019 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants