forked from TrueCloudLab/frostfs-testlib
[#278] Small QoL updates
Signed-off-by: a.berezin <a.berezin@yadro.com>
This commit is contained in:
parent
5bdacdf5ba
commit
8a8b35846e
4 changed files with 12 additions and 7 deletions
|
@ -47,6 +47,7 @@ class ConditionType(HumanReadableEnum):
|
|||
class ConditionKey(HumanReadableEnum):
|
||||
ROLE = '"\\$Actor:role"'
|
||||
PUBLIC_KEY = '"\\$Actor:publicKey"'
|
||||
OBJECT_TYPE = '"\\$Object:objectType"'
|
||||
|
||||
|
||||
class MatchType(HumanReadableEnum):
|
||||
|
@ -75,6 +76,10 @@ class Condition:
|
|||
def by_key(*args, **kwargs) -> "Condition":
|
||||
return Condition(ConditionKey.PUBLIC_KEY, *args, **kwargs)
|
||||
|
||||
@staticmethod
|
||||
def by_object_type(*args, **kwargs) -> "Condition":
|
||||
return Condition(ConditionKey.OBJECT_TYPE, *args, **kwargs)
|
||||
|
||||
|
||||
class Rule:
|
||||
def __init__(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue