fix: Stop rendering Visibility and Move buttons on libraries (#26885)
fix: Stop rendering Visibility and Move buttons on libraries (#26885)

We're fixing an error that appears when you click the "edit access"
button on an XBlock in the library page.

Libraries in the "Add library" page shouldn't have the accessibility
config icon. Access settings for libraries are changed at the top, on
Settings > User Access. When clicking the access-button (the cog) on a
Library, an error appears. This is known to happen on koa.master and
open-release/juniper.3.

This happens due to the way XBlocks are rendered; as they get rendered
initially, the previews are unaware of whether they're part of a
library. We can confirm this by refreshing the page, this makes the
button disappear.

This fix removes the cogwheel when the XBlock is part of a library.
This doesn't affect the XBlocks imported to courses because those are
rendered on a Randomized Content XBlock, which does have its access
options.

Authored by: Daniel Francis <daniel.francis@opencraft.com>
EDUlib/edx-platform,arbrandes/edx-platform,arbrandes/edx-platform,edx/edx-platform,eduNEXT/edx-platform,eduNEXT/edunext-platform,eduNEXT/edunext-platform,edx/edx-platform,eduNEXT/edunext-platform,arbrandes/edx-platform,EDUlib/edx-platform,eduNEXT/edx-platform,arbrandes/edx-platform,angelapper/edx-platform,EDUlib/edx-platform,angelapper/edx-platform,edx/edx-platform,edx/edx-platform,eduNEXT/edx-platform,angelapper/edx-platform,angelapper/edx-platform,eduNEXT/edunext-platform,eduNEXT/edx-platform,EDUlib/edx-platform