[#279] Add objectID filter for APE #279

Merged
abereziny merged 1 commit from abereziny/frostfs-testlib:feature-add-object-id-filter into master 2024-08-09 08:19:56 +00:00

View file

@ -48,6 +48,7 @@ class ConditionKey(HumanReadableEnum):
ROLE = '"\\$Actor:role"'
PUBLIC_KEY = '"\\$Actor:publicKey"'
OBJECT_TYPE = '"\\$Object:objectType"'
OBJECT_ID = '"\\$Object:objectID"'
class MatchType(HumanReadableEnum):
@ -80,6 +81,10 @@ class Condition:
def by_object_type(*args, **kwargs) -> "Condition":
return Condition(ConditionKey.OBJECT_TYPE, *args, **kwargs)
@staticmethod
def by_object_id(*args, **kwargs) -> "Condition":
return Condition(ConditionKey.OBJECT_ID, *args, **kwargs)
class Rule:
def __init__(