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

Research limiting creation / editing of projects to "project leads" #52

Open
machow opened this issue Jan 24, 2022 · 1 comment
Open

Comments

@machow
Copy link
Contributor

machow commented Jan 24, 2022

Currently, anyone can create a project or add themselves to it (I think there's a related issue for this).

Thoughts:

  • Can we take advantage of an existing account level?
  • We can have an extremely loose standard on what a project lead is
@machow machow changed the title Research limiting creation of projects to "project leads" Research limiting creation / editing of projects to "project leads" Jan 24, 2022
@tblacknc
Copy link
Collaborator

tblacknc commented Feb 6, 2022

Looked into doing this... looks easy enough to limit a user from creating a project by removing the "Add Project" button from the projects page if not the appropriate level. This is in the html-templates\projects\projects.tpl file. Could add Developer to the authorized level if wanted:

{if $.User->AccountLevel == "Administrator"}
	<form action="/projects/create">
		<button class="btn btn-success" type="submit">{icon "plus"}&nbsp;{_ "Add Project&hellip;"}</button>
	</form>
{/if}

To deny the ability to create and edit a project add a similar conditional to the projectEdit.tpl file and add a {contentBlock "were sorry"} to explain or remove the "Edit Project" button from the projects/project.tpl file similar to the above.

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

No branches or pull requests

2 participants