Add check on user's staff status to show unavailable partners
@@ -1004,6 +1004,19 @@ class MyLibraryView(TemplateView):
dict
The context dictionary with the available collections added
"""
+ if self.request.user.is_staff:
+ messages.add_message(
+ self.request,
+ messages.INFO,
+ "Because you are a staff member, this page may include "
+ "Partners who are not yet available to all users.",
+ )
+ available_collections = (
+ Partner.even_not_available.order_by("company_name")
+ .exclude(authorization_method__in=[Partner.BUNDLE])
+ .exclude(id__in=partner_id_set)
+ )
+ else:
# Available collections do not include bundle partners and collections
# that the user is already authorized to access
available_collections = Partner.objects.exclude(
