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

feat: add PROJECT_CREATE_ALLOW_ALL environment variable #787

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

NathanVss
Copy link
Contributor

Based on this discussion: #520

The goal is to provide a simple way to allow any user to create a project, where only admin can do it at the moment.

Server

Add this environment variable to server/.env

PROJECT_CREATE_ALLOW_ALL=true

Client

Add this environment variable to client/.env

REACT_APP_PROJECT_CREATE_ALLOW_ALL=true

Thoughts

I used the easiest approach in order to allow us to start using Planka the quickest as possible. But I am not 100% fan of having to duplicate the configuration on the client and the server, imo the best way to do it, is to only keep the server environment variable and make the client load a configuration from an api route /config on first load, where the server would expose configuration parameters like this:

HTTP CODE 200 

{
    "projectCreateAllowAll": true
}

But it would imply more fondamental changes and I don't sufficiently know the client architecture yet to estimate how much, and I think this PR is at least a good starting point to discuss about it.

🙏

@CLAassistant
Copy link

CLAassistant commented Jun 13, 2024

CLA assistant check
All committers have signed the CLA.

@NathanVss NathanVss force-pushed the feat/project-create-allow-all branch from dff5a31 to d92d087 Compare June 13, 2024 13:23
@meltyshev meltyshev merged commit cc1e886 into plankanban:master Jun 14, 2024
1 check passed
@meltyshev
Copy link
Member

Thanks! I fixed it a bit to only require specifying this env variable on the server, and changed the name of the environment variable.

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