Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions infrahub_sdk/protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from .protocols_base import CoreNode, CoreNodeSync

if TYPE_CHECKING:
from .node import RelatedNode, RelatedNodeSync, RelationshipManager, RelationshipManagerSync
from infrahub_sdk.node import RelatedNode, RelatedNodeSync, RelationshipManager, RelationshipManagerSync
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there some problem with the relative import here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't touched this part, not sure why the import was relative in the first place
this is what the current code is generating


from .protocols_base import (
URL,
Boolean,
Expand Down Expand Up @@ -148,6 +149,7 @@ class CoreMenu(CoreNode):
icon: StringOptional
protected: Boolean
order_weight: Integer
required_permissions: ListAttributeOptional
section: Enum
parent: RelatedNode
children: RelationshipManager
Expand Down Expand Up @@ -397,7 +399,6 @@ class CoreNumberPool(CoreResourcePool, LineageSource):


class CoreObjectPermission(CoreBasePermission):
branch: String
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gmazoyer is this change expected ? it wasn't part of my change

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should be fine as we decided to remove the "branch" parts as part of the object permissions with the argument that users probably wouldn't want to setup permissions on specific branches and instead have settings for "allow on default branch" or "allow on other branches" on in the future "allow on branches that I have created".

namespace: String
name: String
action: Enum
Expand Down Expand Up @@ -613,6 +614,7 @@ class CoreMenuSync(CoreNodeSync):
icon: StringOptional
protected: Boolean
order_weight: Integer
required_permissions: ListAttributeOptional
section: Enum
parent: RelatedNodeSync
children: RelationshipManagerSync
Expand Down Expand Up @@ -862,7 +864,6 @@ class CoreNumberPoolSync(CoreResourcePoolSync, LineageSourceSync):


class CoreObjectPermissionSync(CoreBasePermissionSync):
branch: String
namespace: String
name: String
action: Enum
Expand Down