Cannot see "Promote to #{Octopus.Environment.Name}" Button

Hello,

No one on my Team can see the “Promote to #{Environment.Name}” button for any of our projects nor for any releases nor any deployments. I.E. the button should show on the http://#{Server.Url}/app#/projects/#{Project.Name}/releases/#{Release.Version} below the page title and the http://#{Server.Url}/app#/projects/#{Project.Name}/releases/#{Release.Version}/deployments/#{Deployment.Version} on the top bar.

The lifecycle is setup correctly. My team has the “Project Deployer” user role and permissions for the project and all environments associated with the project. In fact, we have all user roles except for “System Administrator” and our system admin is the only one who can see the buttons.

Looking at the HTML for the 2 pages, I found the hidden button. It looks like this:

<a  class="btn btn-success ng-binding octo-permission-denied"
    octo-permission="DeploymentCreate"
    octo-environment="environmentsById[nextDeployments[0]].Name"
    octo-project="project.Id"
    ng-class="customClasses"
    ng-show="nextDeployments.length == 1"
    href="#/projects/#{Project.Name}/releases/#{Release.Version}/deployments/create/to/#{Deployment.Version}"
    octo-denied-project="#{Project.Id}"
    octo-denied-environment="#{Environment.Name}">
    #{Environment.Name}
</a>

It looks like the nextDeployments object is coming from this api call: http://#{Server.Url}/api/releases/#{Release.Version}/progression which IS correctly giving us the correct next environment. I.E. nextDeployments[0] (in octo-environment) is the correct environment as well as nextDeployments.length == 1 (in ng-show) is true.

Also, as you can see, the octo-permission attribute is set to “DeploymentCreate”. Looking at http://#{Server.Url}/api/userroles, there are two user roles with the “DeploymentCreate” permission, “Project Deployer” and “System Administrator”. Since my team has the “Project Deployer” role, we should be able to see the button.

Finally, the only reason that we cannot see the button is there is a octo-permission-denied class on the button.

.fullscreen-body #main-navbar,
.fullscreen-body .page-header,
.octo-permission-denied,
.octo-permission-unknown {
    display: none!important;
}

Sooooo, I think there is a bug in the UI that is incorrectly adding the octo-permission-denied class to that button.

Here are some screenshots: http://imgur.com/a/05JtP

Thank You,
-Alex

Hi Alex,

Thank you for the in-depth troubleshooting. In trying this, I was unable to Promote to Environment with users from a team that had been scoped to environments. If I remove the environment scope the Promote button magically appears. Is that consistent with what you are seeing?

Have lodged an issue you can track here:
https://github.com/OctopusDeploy/Issues/issues/2098

Cheers
Shane

Hi Shane,

That is correct. We tested it out ourselves by creating a Team with the “Project Deployer” role that is not scoped to any environment (we left the ‘Environments’ blank), and I was successfully able to see the “Promote to #{Octopus.Environment.Name}” button!
I will be sure to follow the Github Issue.

Thank You!
-Alex