some reformatting and adjusting so logged in users get moved directly to their feed

This commit is contained in:
2026-04-03 19:40:17 -04:00
parent a926733f1b
commit 874fec835d
19 changed files with 233 additions and 158 deletions

View File

@@ -23,6 +23,20 @@ defmodule Mixer.Posts.TweetLike do
end
end
policies do
policy action_type(:read) do
authorize_if always()
end
policy action(:create) do
authorize_if actor_present()
end
policy action_type(:destroy) do
authorize_if relates_to_actor_via(:user)
end
end
attributes do
uuid_primary_key :id
@@ -52,18 +66,4 @@ defmodule Mixer.Posts.TweetLike do
identities do
identity :unique_user_tweet, [:tweet_id, :user_id]
end
policies do
policy action_type(:read) do
authorize_if always()
end
policy action(:create) do
authorize_if actor_present()
end
policy action_type(:destroy) do
authorize_if relates_to_actor_via(:user)
end
end
end