Skip to content

Commit

Permalink
Add diagram parser acl (#2062)
Browse files Browse the repository at this point in the history
  • Loading branch information
doctrino authored Dec 11, 2024
1 parent 2a94adf commit 29408d2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Changes are grouped as follows
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## [7.70.4] - 2024-12-11
### Fixed
- Added missing `diagramParsingACl` to capabilities.

## [7.70.3] - 2024-12-11
### Fixed
- Aggregation requests with custom properties, like a metadata key, are no longer converted to camelCase
Expand Down
2 changes: 1 addition & 1 deletion cognite/client/_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import annotations

__version__ = "7.70.3"
__version__ = "7.70.4"

__api_subversion__ = "20230101"
14 changes: 14 additions & 0 deletions cognite/client/data_classes/capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,20 @@ class Scope:
ID = IDScope


@dataclass
class DiagramParsingAcl(Capability):
_capability_name = "diagramParsingAcl"
actions: Sequence[Action]
scope: AllScope = field(default_factory=AllScope)

class Action(Capability.Action): # type: ignore [misc]
Read = "READ"
Write = "WRITE"

class Scope:
All = AllScope


@dataclass
class DigitalTwinAcl(Capability):
_capability_name = "digitalTwinAcl"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "cognite-sdk"

version = "7.70.3"
version = "7.70.4"

description = "Cognite Python SDK"
readme = "README.md"
Expand Down
1 change: 1 addition & 0 deletions tests/tests_unit/test_data_classes/test_capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def all_acls():
},
{"datasetsAcl": {"actions": ["READ", "WRITE", "OWNER"], "scope": {"all": {}}}},
{"datasetsAcl": {"actions": ["READ", "WRITE", "OWNER"], "scope": {"idScope": {"ids": ["2918026428"]}}}},
{"diagramParsingAcl": {"actions": ["READ", "WRITE"], "scope": {"all": {}}}},
{"digitalTwinAcl": {"actions": ["READ", "WRITE"], "scope": {"all": {}}}},
{"documentFeedbackAcl": {"actions": ["CREATE", "READ", "DELETE"], "scope": {"all": {}}}},
{"documentPipelinesAcl": {"actions": ["READ", "WRITE"], "scope": {"all": {}}}},
Expand Down

0 comments on commit 29408d2

Please sign in to comment.