[PR #787] [MERGED] feat: add PROJECT_CREATE_ALLOW_ALL environment variable #1101

Closed
opened 2026-02-04 21:50:09 +03:00 by OVERLORD · 0 comments
Owner

📋 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: masterHead: feat/project-create-allow-all


📝 Commits (2)

  • d92d087 feat: add PROJECT_CREATE_ALLOW_ALL environment variable
  • e585ccf fix: 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/.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.

🙏


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/plankanban/planka/pull/787 **Author:** [@NathanVss](https://github.com/NathanVss) **Created:** 6/13/2024 **Status:** ✅ Merged **Merged:** 6/14/2024 **Merged by:** [@meltyshev](https://github.com/meltyshev) **Base:** `master` ← **Head:** `feat/project-create-allow-all` --- ### 📝 Commits (2) - [`d92d087`](https://github.com/plankanban/planka/commit/d92d087e76164cd42ad1ebe4627085064311fdd5) feat: add PROJECT_CREATE_ALLOW_ALL environment variable - [`e585ccf`](https://github.com/plankanban/planka/commit/e585ccf40f4788b7e4ae852b52c0361f90fe696b) fix: Remove specifying env variable on client, refactoring ### 📊 Changes **8 files changed** (+30 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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/.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. 🙏 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-04 21:50:09 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#1101