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

Creating a custom user model for extensibility #3

Merged
merged 10 commits into from
Nov 28, 2023

Conversation

katporks
Copy link
Collaborator

@katporks katporks commented Nov 23, 2023

This pull request focuses on future-proofing the user model by extending the default base class. Implementing this enhancement in the future could pose complexity in terms of migrations, especially once the staging and production schema is established. Anticipating the extension now makes migrations less intricate for future modifications or additions of fields.

The default Wagtail User model includes the following fields:

  • Username
  • Email
  • First name
  • Last name
  • Password

Users can assume one of the following roles:

  • Administrator: Full access to manage any object, setting, or user.
  • Moderators: Access to creating and publishing drafts (no access to settings).
  • Editor: Can create drafts but not publish them (no access to settings).

Feel free to suggest any fields for modification or addition!

Additionally, this pull request enables running pytest in a local setup.

Copy link
Member

@spwoodcock spwoodcock left a comment

Choose a reason for hiding this comment

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

I moved the requirements-dev.txt install to a separate stage two two reasons:

  • As the inheritance order changed we don't need to pre-compile the dependencies for debug.
  • We also don't want to run the debug image as root. That's only needed for the test (ci) image.

Otherwise looks good to me 👍

@katporks katporks merged commit 260ebda into main Nov 28, 2023
3 checks passed
@katporks katporks deleted the feature/add-custom-user-model branch December 8, 2023 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants