Forum:Terms of Use question

Hello. On one of my wikis I prohibit the use of galleries and slideshows on articles, and I believe I figured out a code to remove the gallery and slideshow buttons under "Add features and media" in the editor, but I am unsure if this act is allowed by the terms of use. --