can I disable "Integrate" button on Xcode Server web page?

I've created a few Bots in Xcode, and they do what they need to. When I go to the "Xcode Server" web page on my local network, I see all of my bots listed with their status, etc.


However, each of the jobs listed has an "integrate" button shown. I don't want random users hitting an "Integrate" button, and forcing a new build.


In the settings for Xcode Server, there is a setting to say "Bots can be created & viewed by" - for that I have "Logged in users".

Then it says "Also allow view-only access for:" and that's set to "all users". Because I'd like people in my local network to see what's happening. However, the Integrate button is still available, even if I'm not a logged-in user. It's almost like guests can launch integrations, which I totally don't want to allow.


I'd like only logged-in users to be able to manually execute an integration. Everyone else can view progress, or download an IPA, but that's it. But it seems that anyone can launch a manual integration. If so, is there a way to disable this?

Accepted Reply

There's no way to disable this (but it's worth filing an enhancement request bug). Anyone who can view bots, can trigger new integrations.

Replies

There's no way to disable this (but it's worth filing an enhancement request bug). Anyone who can view bots, can trigger new integrations.

If you don't mind getting your hands slightly dirty, I have a way of doing this.


On the Mac that is running the xcode server edit this file:

/Applications/Xcode.app/Contents/Developer/usr/share/xcs/xcswebui/webui/javascripts/webui-optimized.js


Find the key value:

"_XCS.BotDetail.BotList.Integrate": "Integrate"


and change it to:

"_XCS.BotDetail.BotList.Integrate": " "


If you have trouble with file permissions then copy the file to the desktop first, then edit it, then copy it back.


Also note that this file may be cached on devices but if you visit the bot in a private browsing session or clear safari caches you'll see the change immediately.