<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_perm(self, service, perm_name, obj, call_name):
 """ Raise PermissionDenied if user has no permission in object """

        user = service.user
        if not (perm_name is False):
            if not user.has_perm(perm_name, obj=obj):
                LOG_PERM.warn(
                    u'User %s has no permission %s. Access to %s with obj=%s',
                    user, perm_name, call_name, obj)
                raise PermissionDenied(u'User %s has no permission %s for object %s' % (service.user, perm_name, obj))

            LOG_PERM.debug(
                u'User %s was authorized to access %s with permission %s with obj=%s',
                user, call_name, perm_name, obj)