mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-22 07:52:43 +00:00
Fix accessing group draft post
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
011128b0fb
commit
221dd0609e
2 changed files with 3 additions and 3 deletions
|
@ -91,9 +91,9 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Posts do
|
|||
def group_actor(%Post{attributed_to_id: attributed_to_id}),
|
||||
do: Actors.get_actor(attributed_to_id)
|
||||
|
||||
def permissions(%Post{draft: draft}) do
|
||||
def permissions(%Post{}) do
|
||||
%Permission{
|
||||
access: if(draft, do: nil, else: :member),
|
||||
access: :member,
|
||||
create: :moderator,
|
||||
update: :moderator,
|
||||
delete: :moderator
|
||||
|
|
|
@ -297,7 +297,7 @@ defmodule Mobilizon.GraphQL.Resolvers.PostTest do
|
|||
}
|
||||
)
|
||||
|
||||
assert is_nil(res["errors"])
|
||||
assert res["errors"] == nil
|
||||
|
||||
assert res["data"]["post"]["title"] == post_draft.title
|
||||
assert res["data"]["post"]["draft"] == true
|
||||
|
|
Loading…
Reference in a new issue