Source code for py_abac.policy.conditions.others.any

"""
    Attribute any value conditions
"""
from marshmallow import Schema, post_load

from ..base import ConditionBase


[docs]class Any(ConditionBase): """ Condition for attribute having any value """
[docs] def is_satisfied(self, ctx) -> bool: return True
[docs]class AnySchema(Schema): """ JSON schema for any value condition """
[docs] @post_load def post_load(self, data, **_): # pylint: disable=missing-docstring,no-self-use,unused-argument return Any()