generated from coulomb/repo-seed
Governed asset registry slice with asset creation, representations, metadata, lifecycle transitions, policy authorization, fail-closed denial, audit events, and version records
This commit is contained in:
@@ -77,3 +77,16 @@ class PolicyDecision:
|
||||
}
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, data: dict[str, Any]) -> "PolicyDecision":
|
||||
return cls(
|
||||
decision_id=data["decision_id"],
|
||||
effect=PolicyEffect(data["effect"]),
|
||||
subject_id=data["subject_id"],
|
||||
action=data["action"],
|
||||
resource=data["resource"],
|
||||
reason=data.get("reason", ""),
|
||||
obligations=dict(data.get("obligations", {})),
|
||||
context=dict(data.get("context", {})),
|
||||
decided_at=data["decided_at"],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user