User permissions and Lifecycle with automatic deployment

Hi

We’re having an issue trying to implement the following scenario:
Team A (administrators) uses a lifecycle with automated deployment to TEST environment.
Team B (Project Lead) uses the same lifecycle. Team B shouldn’t be able to deploy according to their permissions but unfortunately Octopus applies the lifecycle and automatically deploys.
We tried adding an identicle lifecycle without automatic deployment for Team B’s projects, but team B can simply edit the process and change the lifecycle.

Is this an issue or am I missing something? should’t lifecycle never deploy automatically if the user initiating does not have deploy permissions?

Thanks for your feedback

Hi,

Thanks for reaching out. Are team A and team B on the same project/s or they are on different ones? The answer will vary depending on this fact.

Just one thing: the Automatic Deployments are triggered by a system account and not by a specific user. If a user has the power to make a release reach a certain phase, then he will be able to have the system trigger a deployment for him.

I’m gonna hold off my answer regarding a posible approach until you come back to me for the TeamA/TeamB question above.

Thanks!

Dalmiro

Hi Dalmiro,

Thank you for coming back to me on this subject.

Team A and team B are on different projects. My current solution has been to define custom permissions for Team B. Is this the correct approach? I’ve also noticed that when some permissions are missing octopus will generate javascript errors - access denied (for example If I give the deploy permissions but not the view machine permissions).

Regards,
Antoine

De : Dalmiro Grañas [mailto:tender2+d848b473ad@tenderapp.com]
Envoyé : jeudi 10 septembre 2015 22:06
À : DONGOIS Antoine * AXONES
Objet : Re: User permissions and Lifecycle with automatic deployment [Problems #38704]

Hi Antoine,

Giving Team B a custom set of permissions is definitely the way to go. I’m glad to hear you got it working that way.

RE the error, you should get one on the UI, but not a JS error, do you happen to have a screenshot of it you can share?

Thanks,

Dalmiro

Hi Dalmiro,

I see the JavaScript error in the console log of the browser, I’ve included a screenshot below.

Note that I’m unable to deploy in this situation (screenshot octo2.png shows the javascript error when clicking on the deploy now button)

Regards
Antoine

De : Dalmiro Grañas [mailto:tender2+d848b473ad@tenderapp.com]
Envoyé : vendredi 11 septembre 2015 19:21
À : DONGOIS Antoine * AXONES
Objet : Re: User permissions and Lifecycle with automatic deployment [Problems #38704]

Hi Antoine,

Could you please capture the traffic of your browser using Fiddler and send us the session log? I’d like to see if there are any API calls failing before the JS error.


http://docs.telerik.com/fiddler/Save-And-Load-Traffic/Tasks/CreateSAZ

Thanks,

Dalmiro

Hello,

I’ve attached the relevant file.

I’ve also included screenshots showing all the user’s permissions.

Antoine

[cid:image001.png@01D0EFA0.1DE3AB50]

[cid:image002.png@01D0EFA0.1DE3AB50]

De : Dalmiro Grañas [mailto:tender2+d848b473ad@tenderapp.com]
Envoyé : lundi 14 septembre 2015 20:39
À : DONGOIS Antoine * AXONES
Objet : Re: User permissions and Lifecycle with automatic deployment [Problems #38704]

octopus.zip (40 KB)

There is a mistake in the below screenshot, “MachineView” was unchecked during tests. If it’s checked I don’t get any JS errors.

De : DONGOIS Antoine * AXONES
Envoyé : mardi 15 septembre 2015 10:20
À : ‘Dalmiro Grañas’
Objet : RE: User permissions and Lifecycle with automatic deployment [Problems #38704]

Hello,

I’ve attached the relevant file.

I’ve also included screenshots showing all the user’s permissions.

Antoine

[cid:image001.png@01D0EFA0.411315C0]

[cid:image002.png@01D0EFA0.411315C0]

De : Dalmiro Grañas [mailto:tender2+d848b473ad@tenderapp.com]mailto:[mailto:tender2+d848b473ad@tenderapp.com]
Envoyé : lundi 14 septembre 2015 20:39
À : DONGOIS Antoine * AXONES
Objet : Re: User permissions and Lifecycle with automatic deployment [Problems #38704]

Hi,

That explains the error then. The user must have MachineView as at the beginning of the deployment, all the machines involved in it are listed. The user should have access to see these machines for this.

Thanks,

Dalmiro

I’ve created this github issue to improve the messaging when the user reaches that phase while missing MachineView rights: https://github.com/OctopusDeploy/Issues/issues/2010

Hi Dalmiro,

I expected this was normal behavior but having the deploy button not doing anything except for the JavaScript console is not very informative.

Thanks for created the github.

Antoine

De : Dalmiro Grañas [mailto:tender2+d848b473ad@tenderapp.com]
Envoyé : vendredi 18 septembre 2015 23:38
À : DONGOIS Antoine * AXONES
Objet : Re: User permissions and Lifecycle with automatic deployment [Problems #38704]