From 23dcb47ce5070d5ff10377451e6c0ce5d8bf9afd Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 19 Oct 2020 19:21:39 +0200 Subject: [PATCH] Make sure only group moderators can update/delete events, posts Signed-off-by: Thomas Citharel --- js/src/views/Resources/ResourceFolder.vue | 100 +++++++--------- lib/federation/activity_pub/transmogrifier.ex | 47 ++++++-- lib/federation/activity_pub/types/actors.ex | 3 + lib/federation/activity_pub/types/comments.ex | 3 + .../activity_pub/types/discussions.ex | 3 + lib/federation/activity_pub/types/entity.ex | 26 +++++ lib/federation/activity_pub/types/events.ex | 4 + lib/federation/activity_pub/types/posts.ex | 7 +- .../activity_pub/types/resources.ex | 3 + .../activity_pub/types/todo_lists.ex | 3 + lib/federation/activity_pub/types/todos.ex | 3 + .../activity_pub/types/tombstones.ex | 3 + lib/federation/activity_pub/utils.ex | 77 +++++++++++-- lib/graphql/error.ex | 1 + lib/graphql/resolvers/post.ex | 4 +- lib/graphql/resolvers/resource.ex | 16 ++- .../transmogrifier/delete_test.exs | 109 +++++++++++++++++- .../transmogrifier/update_test.exs | 102 +++++++++++----- 18 files changed, 400 insertions(+), 114 deletions(-) diff --git a/js/src/views/Resources/ResourceFolder.vue b/js/src/views/Resources/ResourceFolder.vue index 1dcb85952..8def62dc9 100644 --- a/js/src/views/Resources/ResourceFolder.vue +++ b/js/src/views/Resources/ResourceFolder.vue @@ -114,6 +114,7 @@ :resource="localResource" :group="resource.actor" @delete="deleteResource" + @rename="handleRename" @move="handleMove" v-else /> @@ -143,7 +144,7 @@