parameters: (self, bundle)
return_statement: return bundle
docstring: Protects user's personal information from non staff
docstring_summary: Protects user's personal information from non staff
docstring_tokens: Protects user s personal information from non staff
function: def dehydrate(self, bundle):
          """
          Protects user's personal information from non staff
          """
          is_owner = bundle.request.user == bundle.obj
          is_admin = bundle.request.user.is_staff or bundle.request.user.is_superuser
          if not (is_owner or is_admin):
              bundle.data = dict(id=bundle.obj.id, username=bundle.obj)
          return bundle
function_tokens: def dehydrate ( self , bundle ) : is_owner = bundle . request . user == bundle . obj is_admin = bundle . request . user . is_staff or bundle . request . user . is_superuser if not ( is_owner or is_admin ) : bundle . data = dict ( id = bundle . obj . id , username = bundle . obj ) return bundle