Skip to content
Snippets Groups Projects
Verified Commit 4ac7aadf authored by Philipp S. Sommer's avatar Philipp S. Sommer
Browse files

fix permissions

parent cbd4a96d
No related branches found
No related tags found
No related merge requests found
Pipeline #151216 passed
......@@ -85,7 +85,7 @@ class TopicProducer(JsonWebsocketConsumer):
if topic is None:
if (
app_settings.DASF_CREATE_TOPIC_ON_MESSAGE
and self.user.has_perm("dasf_broker.add_BrokerTopic")
and self.user.has_perm("dasf_broker.add_brokertopic")
):
topic = BrokerTopic.objects.create(slug=self.dasf_topic_slug)
assign_perm("can_produce", self.user, topic)
......@@ -108,6 +108,7 @@ class TopicProducer(JsonWebsocketConsumer):
is_response_topic=True,
)
if created:
assign_perm("can_consume", self.user, response_topic)
for user in get_users_with_perms(topic, "can_consume"):
assign_perm("can_produce", user, response_topic)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment