mirror of
https://github.com/plankanban/planka.git
synced 2026-02-05 00:39:58 +03:00
[PR #787] [MERGED] feat: add PROJECT_CREATE_ALLOW_ALL environment variable #1101
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/plankanban/planka/pull/787
Author: @NathanVss
Created: 6/13/2024
Status: ✅ Merged
Merged: 6/14/2024
Merged by: @meltyshev
Base:
master← Head:feat/project-create-allow-all📝 Commits (2)
d92d087feat: add PROJECT_CREATE_ALLOW_ALL environment variablee585ccffix: Remove specifying env variable on client, refactoring📊 Changes
8 files changed (+30 additions, -7 deletions)
View changed files
📝
client/src/containers/ProjectsContainer.js(+2 -1)📝
docker-compose-dev.yml(+5 -4)📝
docker-compose.yml(+2 -0)📝
server/.env.sample(+2 -0)📝
server/api/controllers/projects/create.js(+16 -0)📝
server/api/controllers/show-config.js(+1 -0)📝
server/config/custom.js(+2 -0)📝
server/config/policies.js(+0 -2)📄 Description
Based on this discussion: https://github.com/plankanban/planka/discussions/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/.envClient
Add this environment variable to
client/.envThoughts
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
/configon first load, where the server would expose configuration parameters like this: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.
🙏
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.