1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-25 16:19:47 +02:00

feat: Ability to allow everyone to create projects (#787)

This commit is contained in:
NathanVss 2024-06-14 16:38:06 +02:00 committed by GitHub
parent f0e9fe7904
commit cc1e886a31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 30 additions and 7 deletions

View file

@ -6,12 +6,13 @@ import entryActions from '../entry-actions';
import Projects from '../components/Projects';
const mapStateToProps = (state) => {
const { allowAllToCreateProjects } = selectors.selectConfig(state);
const { isAdmin } = selectors.selectCurrentUser(state);
const projects = selectors.selectProjectsForCurrentUser(state);
return {
items: projects,
canAdd: isAdmin,
canAdd: allowAllToCreateProjects || isAdmin,
};
};