Skip to content

Conversation

@odesenfans
Copy link
Collaborator

Fixed an issue where the check of permissions would fail if
the content.address field of the message was set to a different
address than the sender and the owner of this address did not
authorize the sender to post message on their behalf.

Added basic unit tests for the permission system.

@odesenfans odesenfans requested a review from hoh May 9, 2022 14:10
Fixed an issue where the check of permissions would fail if
the content.address field of the message was set to a different
address than the sender and the owner of this address did not
authorize the sender to post message on their behalf.

Added basic unit tests for the permission system.
@odesenfans odesenfans force-pushed the od-fix-permissions-nonetype-not-iterable branch from ef55bac to 3c92069 Compare May 9, 2022 14:33
@hoh hoh merged commit 56d97a2 into aleph-im:dev May 9, 2022
]

# Note: type-ignore statements are required because mypy does not understand that
# the nested dictionaries we declared just above are dictionaries.
Copy link
Member

Choose a reason for hiding this comment

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

Could this be fixed with type annotation on the variable ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Technically yes, with TypedDict. But it's gonna be a PITA to maintain so I'd rather keep the type ignores. Also, there's an off-chance that this will someday be fixed in mypy. That day, the type ignore statements will trigger errors so we will know 😛

@odesenfans odesenfans deleted the od-fix-permissions-nonetype-not-iterable branch May 9, 2022 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants