Roles and operations for collaboration
The following should be possible in the UI:
- Repo sharer allows other people to push (right now Idk how to tell whether a given push is a force push, or what the target branch is, or whether the push is actually an instruction to delete a branch; leave that for later, just focus on giving people push access)
- Repo sharer allows all users to open tickets
- Repo sharer allows all users to comment on tickets
Check how these things work right now. I know it’s weird because roles are per-sharer. That’s another issue to think about!
Push
Right now src/Vervis/Ssh.hs
determines push access like this:
- If the pushing user is a collaborator of this repo, and their role in this repo has the
RepoOpPush
operation, then they can push - If the default role for users in this repo has the
RepoOpPush
operation, then they can push - If neither holds, then they can’t push
Here’s how I added a collaborator with push access:
- Log in
- In homepage there’s a link to project roles, create a new one because initially there are none at all
- Same for repo roles, but it’s optional because can just use the existing Developer role you have
- Browse to the project, click Collaborators, add
/new
to the URL because there’s no link in the UI, add the user you want. It will give an error due to missing SVG fonts (I need to fix that!! Probably by changing the SVGFonts data path and adding these font files to my deploy.sh script? Or do the fonts come from the system?), but it does add a collaborator - Browse to repo (that belongs to the project), click Collaborators, again add
/new
to URL, choose user and role - You may need to browse to homepage, click repo roles, add RepoOpPush to the role you used. I just used the existing Developer role, which already had this op
EDIT: I fixed the SVG font error!
Open ticket
The ticket open and edit handlers seem to allow any logged in user to do these operations, but isAuthorized
in Foundation.hs
allows only the sharer of the project to access them.
I’m adding a project role op for opening a ticket, and using that to control access to opening a ticket.
Comments
isAuthorized
allows any registered user to make comments.
I’m making a new user fr33test
to check these things and generally use for testing features.
Status: Closed on 2018-05-26 by ~fr33domlover