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

Auto add super user #53

Merged
merged 6 commits into from Jan 3, 2023
Merged

Auto add super user #53

merged 6 commits into from Jan 3, 2023

Conversation

ofirtzabari
Copy link
Collaborator

@ofirtzabari ofirtzabari commented Jan 2, 2023

add migrations file 0003 that auto add admin super user.
close issue #48
the migrations file 0002 here only because 0003 releted him, can delete 0002 after it will marge to not cause error

FaezZangariya
FaezZangariya previously approved these changes Jan 2, 2023
Copy link
Collaborator

@FaezZangariya FaezZangariya left a comment

Choose a reason for hiding this comment

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

LGTM

commune_app/migrations/0002_add_user_test_data.py Outdated Show resolved Hide resolved
commune_app/migrations/0003_createsuperuser.py Outdated Show resolved Hide resolved
@ofirtzabari
Copy link
Collaborator Author

@kobihk
set_password() is necessary because it keeps the password encoded and without it it is impossible to connect to the user

@ofirtzabari ofirtzabari mentioned this pull request Jan 2, 2023
bennypowers
bennypowers previously approved these changes Jan 2, 2023
EliasAndry
EliasAndry previously approved these changes Jan 2, 2023
Copy link
Contributor

@kobihk kobihk left a comment

Choose a reason for hiding this comment

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

@ofirtzabari please rebase

add migrations file 0003 that auto add admin super user
close issue redhat-beyond#48
*the migrations file 0002 here only because 0003 releted him, can delete
0002 after it will marge to not cause error*
add migrations file 0001 and 0002 for 0004 will work
change the superuser to create in one line
connect this file(0004) in the dependencies to 0003 file
Removal of "is_active" which is not necessary
add file migrations 0005 to aplly all migrations
Copy link
Collaborator

@RonTuretzky RonTuretzky left a comment

Choose a reason for hiding this comment

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

LGTM

@kobihk kobihk merged commit f4d5407 into redhat-beyond:main Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants