[V2.0] Track Permissions Through Topics #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of change
Currently the only place we use
Permissionedis when we are doing checks onKeyloadmessages, but those permissions are not retained in store anywhere, as our cursor store only uses the Identifier. To allow for that permission retention we need to changeCursorStoreto map byPermissioned<Identifier>instead of justIdentifier. This brings a host of other trickling changes along with it.For example, a
Userwill be able to check their permissions on a topic before they attempt to send messages, failing if they are registered asReadby a topic administrator. Additionally administrative privileges can be properly assigned and forwarded through the topics.Type of change
How the change has been tested
New section added to end of examples to have
Authorre-subscribeSubscriberAand grant them Admin privileges, confirming that they carry forward into new branches.