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

Fix/Api-endpoints-no-data #391

Merged
merged 3 commits into from
Jan 28, 2025
Merged

Fix/Api-endpoints-no-data #391

merged 3 commits into from
Jan 28, 2025

Conversation

theodorklauritzen
Copy link
Member

This is very useful for the first user on the system. Maybe we need another solution longterm.

In addition I fixed a bug in apiHandler at endpoints that don't expect any data.

@theodorklauritzen theodorklauritzen requested review from Paulijuz and JohanHjelsethStorstad and removed request for Paulijuz January 27, 2025 20:15
@JohanHjelsethStorstad JohanHjelsethStorstad changed the title Add scripts to make a user admin from the command line. Feat/Add scripts to make a user admin from the command line. Jan 28, 2025
Copy link
Member

@JohanHjelsethStorstad JohanHjelsethStorstad left a comment

Choose a reason for hiding this comment

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

I am not sure I am comfortable having a lot of random python scripts. It makes the project hard to maintain

src/app/api/apiHandler.ts Outdated Show resolved Hide resolved
@Paulijuz
Copy link
Member

I agree with Johan. Having random scripts seems unmaintainable. Wouldn't this be solvable with a simple check when creating a user. Or what about seeding a standard admin user?

@theodorklauritzen
Copy link
Member Author

I agree that a lot of Python scripts aren't good practice. Maybe I'm not aware of a nice way to get admin access in production now during testing, but for now, this is a fast way to give a single user admin access. The script will be deleted when we release PN, since we'll never clear the database.

@theodorklauritzen
Copy link
Member Author

We could seed a admin user to prod that would also work fine. It's just nice to have a easy way to get admin permissions in prod

@JohanHjelsethStorstad JohanHjelsethStorstad changed the title Feat/Add scripts to make a user admin from the command line. Fix/Api-endpoints-no-data Jan 28, 2025
@theodorklauritzen theodorklauritzen merged commit 5920f01 into main Jan 28, 2025
2 checks passed
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.

3 participants