title: How to restrict Django Rest Framework browsable API interface to admin users
body: <p>I'm developing a Django Rest Framework backend for a mobile app. The API is private and will only ever be used internally.</p>
  
  <p>The browsable API is convenient for helping developers working on the project but I would like to prevent anyone who's not set as an admin on the project from using the browsable interface. </p>
  
  <p>I realize that the browsable admin doesn't grant any permissions that user wouldn't otherwise have, but it does have some security gray areas (e.g. for models with a foreign key relationship, the HTML selector field gets populated with all the possible related objects in the DB unless you specifically instruct it not to).</p>
  
  <p>Because this app handles sensitive user data, I'd prefer to expose the smallest surface area possible to the public to reduce the risk of my own potential mistakes oversights.</p>
  
  <p>Is there any way to disable the browsable API for non-admin users without disabling it for everyone? I've done a fair amount of Google searching and looked on SO and haven't found an answer. This question is close <a href="https://stackoverflow.com/questions/11898065/how-to-disable-admin-style-browsable-interface-of-django-rest-framework">How to disable admin-style browsable interface of django-rest-framework?</a> but not the same because those instructions disable the interface for everyone.</p>