<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def has_restricted_sites(self, request):
 """ Whether the current user has permission on one site only :param request: current request :return: boolean: user has permission on only one site """

        sites = self.get_restricted_sites(request)
        return sites and sites.count() == 1