Some of our projects somehow did not get the New Code Definition setup and now I can't set it?

I am recently an admin for my organisation and on these incorrectly configured projects I get this error message on the Overview page

“Quality Gate
Not computed
The Quality Gate helps you see if your New Code is deployable or not.
Ask your admin to set New Code Definition to get one”

When I go on the Project’s Administration->Quality Gate tab, and click the New Code configuration link I get thrown out of SonarCloud and told “You are not authorized to access this page. Please log in with more privileges and try again.”

Hey there.

That’s weird! Can you open up your browser dev tools to see which API endpoint specifically is returning a 403?

Hi Colin

Link I am clicking is https://sonarcloud.io/project/new_code?id=[project name]

No 403 in the traffic according to what is being logged.

Do you mind sharing a screenshot of where you’re clicking that link? I think we’re going to find out you’re missing some Administer rights on the project, but if you’re accessing that link via the Project Administration tab, that wouldn’t make sense…

Hi Colin
One of the older admins was looking at this for me too, and noticed I was not in the Owners Group even though my account is added as an organisation admin. He’s added me to that, and it has resolved the issue! Thank you for looking into this!

1 Like