'Return True if user_obj has any permissions in the given app_label.'

def has_module_perms(self, user_obj, app_label):

    if (not user_obj.is_active):
        return False
    for perm in self.get_all_permissions(user_obj):
        if (perm[:perm.index('.')] == app_label):
            return True
    return False
