Cloning a project in Octopus

Hi Team,

I am trying to clone a project. It says project view permission is missing.

The permission given to the user are:
Project initiator(includes project viewer permission)
Project contributor(includes project viewer permission)
Deployment creator
Environment viewer
Project deployer
Release creator

Still do we need to give project viewer permission explicitly.

One more thing, what I notice is, if I give project viewer permission as well. Then while cloning it says project view permission missing but clones the project.

I am using octopus 2023.1 version

Thanks,
Prabhjot

Good afternoon @prabhjotkour.91,

Thank you for contacting Octopus Support and sorry to hear you are seeing permission issues when trying to clone a project. I just tested this on my on-prem instance which is running 2023.1.9794 and I cannot replicate this unfortunately.

I setup a test user which has just the permissions you put in your initial response and tried to clone a project, this worked straight away for my test user. The test user only has those permissions.

Can you confirm if those permissions are scoped to anything at all?

I just tested with scoping both or one of the Project initiator and Project Contributor roles to a different project group and I have no option to clone my test project, the clone option on the projects General page does not even show so I do not think this is permission scoping.

Are you able to let me know your exact Octopus 2023.1 version just in case you are running a slightly older version and this is a bug in that version.

Also, are you able to get me a full permissions export of that user please so I can ensure my testing is like for like:

I look forward to hearing from you,

Kind Regards,
Clare

Hey @prabhjotkour.91,

Oh that is interesting! I just tested this myself and low and behold - I can now see the error, even though the project in question I am trying to clone is in the Project Group the project is apart of, I also have the clone option which does suggest I have the permissions to clone that project!

If I take off the scoping for Project Initiator and Project Contributor I can clone the project fine even with the other permissions scoped:

If I put the scoping back on Project Initiator it allows me to clone, and if I then take that scoping off Project Initiator and have the scoping on Project Contributor it allows me to clone with no issues.

So this looks like it only happens if you have both Project Initiator and Project Contributor scoped, if you take the scoping off one or the other it works fine.

Thank you so much for bringing this to our attention, I will get a GitHub issue raised for this and inform our engineers. I will get you the GitHub link once I have raised it!

If there is anything else you need in the meantime let me know and I will do my best to help,

Kind Regards,
Clare

Hi Clare,

Thanks for the solution, but if I remove scope on any one of them, then they can view other project groups as well.

Thanks,
Prabhjot

Hey @prabhjotkour.91,

I just created the GitHub issue so will get that in front of our engineers to take a look at. Subscribe to that GitHub issue to get updates on when a fix is out.

As for the workaround I suggested to remove the scoping, I can totally understand doing that will allow users to see the other projects and also be able to edit some of them, which I do agree is not ideal.

I found some extra things whilst testing for the GitHub issue so give that a read as you can see what else I found from my testing.

I did create a user role and just had the Project View permission on it and if I don’t scope that I do not see the error at all, it allows me to clone the project I want even with scoping on the other roles. I believe you said you tried that and it still threw the error but cloned the project. This was not the case in my testing.

If I have my permission setup like this:

With the Clone Test being the user role I created with just project view in it, I did not scope it and I am able to clone without any errors.

I am not sure if you tried that or not? Having re-read your initial comment did you try putting Project Viewer on one of the current user roles? If so that would have been scoped too so the only way you could get this to work without giving a user too much ‘power’ would be to have Project Viewer in its own custom role and not scope that. This way users would only be able to view all the projects not actually edit them.

Would that be a better solution for you to try?
Kind Regards,
Clare

Hi Clare,

Yes, this would be definitely the better solution for now and I tried with project viewer permission but yes, I scoped that as well.

Thank you for the solution

Regards,
Prabhjot

Hey @prabhjotkour.91,

No worries at all, glad the other workaround suited your needs and you are now able to clone projects with no error message.

Keep an eye out for updates on that GitHub issue, there is also another one our engineers pointed me to last night which covers the issue you mentioned about adding ProjectView to an already built in group which ends up giving you the error but it does actually clone the project.

That issue is here so if you subscribe to that too hopefully we can get them both fixed at the same time!

Reach out if you need anything further as we are always on hand to help,
Kind Regards,
Clare

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.