Skip to content

Posts 0.7.0: Three new permissions decide who can see and change other people's posts

Posts 0.7.0 decides who may see and change other people’s posts with three new permissions, so a role with access to Posts no longer gets every draft and every author’s email. It also works with PhoenixKit core 3.

Three permissions split out of Posts

Until now a role with the Posts permission could open the whole admin list, publish, unpublish and delete anyone’s post from it, and open the module’s settings. Editing someone else’s post was kept for the Admin and Owner roles. The rights are now separate, and the permissions screen lists them under Posts:

  • Manage everyone’s posts: edit, delete, publish and unpublish posts written by other users.
  • See everyone’s posts: see other users’ drafts and unpublished posts, and the email address of every post’s author.
  • Change the module’s settings: open and save the Posts settings page.

Every Posts page applies the same rule. A person may always act on their own posts. Anyone with Posts sees their own posts and the published ones (public or unlisted) of others; drafts and scheduled posts of other people show only with See everyone’s posts. Without it, the author column shows a username, or Another user, instead of an email address. The edit, publish, move to draft and delete buttons appear only on posts the person may change, and the bulk actions skip the rest. Opening a post without the right ends with You don’t have permission to see this post.

The bulk Add to Group menu now offers only groups the person may add to: their own groups, or any group with Manage everyone’s posts. Other people’s private groups are left out of it without See everyone’s posts.

The settings page saves only its own settings

The Posts settings page wrote every value it was sent into the site’s settings, so anyone allowed on that page could change any site setting with a crafted request. It now saves only the Posts settings it shows. It needs Change the module’s settings, checked on opening and on every save.

Repair and file checks

The module now gives PhoenixKit a description of its 13 tables, so mix phoenix_kit.repair and mix phoenix_kit.doctor can check and repair them. It also tells PhoenixKit’s orphaned-file check which of its rows point at a stored file: post media, post groups and posts. What counts as an orphan does not change.

Upgrading

Posts 0.7 needs PhoenixKit 2.65.0 or later and works with core 3. There is no migration. Nobody loses access: at the next start, every role that already holds the Posts permission is granted the three new permissions once, and Admin gets them from core. After that a revoke sticks. To narrow a role, remove the permissions it should not have in the role’s permission settings.

Full release notes: Posts 0.7.0

0.7.0 · 27 October 2026

Changed

  • Core pin widened to >= 2.65.0 and < 4.0.0: works with core 3.x (core 3.0 stops creating the module tables; this module’s own chain builds its tables). The floor is the first core with the file_references/0 and expected_schema/0 callbacks, which now carry @impl PhoenixKit.Module.

Added

  • The module supplies the manifest of its 13 tables (expected_schema/0, PhoenixKitPosts.ExpectedSchema), so mix phoenix_kit.repair and mix phoenix_kit.doctor check and repair them again, now from the module’s own chain instead of core’s manifest. Generated from PhoenixKitPosts.Migrations by core’s dev_docs/squash/generate_module_manifest.exs, never edited by hand. Core uses it from the first release after 2.64.1; before that nothing reads it. Repair is additive (it creates what is missing and reports the rest) and checks the tables only while the database is at the chain’s current version. No migration.
  • The module now tells core’s orphan-file check which of its rows point at a stored file (file_references/0, in FileReferences): phoenix_kit_post_media, phoenix_kit_post_groups, phoenix_kit_posts. The SQL moved here verbatim from core’s PhoenixKit.Modules.Storage; a test compares it with core’s own copy. Core reads the callback from the first release after 2.64.1; before that, core’s own list stays in force. No migration, no change in what counts as an orphan.

Posts 0.7.0. Install or update: {:phoenix_kit_posts, "~> 0.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.