this is for experiemntal use only do not use this if you don't know what you're doing you could do something bad or irreversible, idk, read the script first and see if it looks alright to run
Problem: When you visit {xcodeserver}.com/xcode there is this terrible little button there named "integrate". Xcode Server doesn't have any web UI configuration options whatsoever. None, literally nothing. This is a huge issue if you want to want to grant "view-only" access to someone who is not a developer.
Major pain points:
- You can't disable integration triggering by user or role
- You can't / shouldnt give access to this page to someone who isn't a developer to go triggering builds all over the place
Solution: Just completely disable the "integrate" button on the webUI. Developers can trigger builds from Xcode, there is literally no need to have unmitigated access like this from the WebUI. Keep this script handy for the future (in case it gets overridden by, say, a new version of Xcode, which will definitely happen)
- back it up
- make sure to backup the default file and put it somewhere safe
cp /Applications/Xcode.app/Contents/Developer/usr/share/xcs/xcswebui/webui/javascripts/webui-optimized.js $somewheresafe
- download these files
- cd to wherever you put them
- make another working copy of the default file
cp $path-to-file/webui-optimized.js .
- on your working copy, edit the button out of the js
- open the file in your editor of choice
- cmd + f to search and look for:
"_XCS.BotDetail.BotList.Integrate": "Integrate"
- modify by removing the
"Integrate"
and replacing with" "
// this empty space is important - it should now read:
"_XCS.BotDetail.BotList.Integrate": " "
- save your working copy
- run this script
- open terminal
- run
sudo disableIntegrateButton.sh
Wrap-up As long as you are sudo, it should work. Then:
- navigate to {xcodeserver}.com/xcode and login
- the "integrate" button should be vanquished
If you don't see it, you may have a cached version of the page. Open a new private browser window and try again.
Copyright 2019 GigabiteLabs, & Giganom, LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.