Skip to content

PhoenixKit 3.3.0: Managed organizations, personal API keys and library backups

PhoenixKit 3.3.0 is the first release on Hex since 3.0.0 and carries the work of 3.0.1 to 3.2.6 with it: organizations run by managers, personal API keys, library access modes, backup storage for libraries and a media picker.

Organizations run by managers

An administrator can create a managed organization (Create managed organization on the user form) or convert an existing organization account. A managed organization has no login of its own: one or more managers act for it from their own accounts. Converting revokes the organization’s own credentials, and converting back (Give this organization its own login) sets a new login email and password.

The organization’s Managers card lists its managers and a Contact email that account mail goes to. Managers invite others by email (Invite a manager by email), and administrators can search for an active person and add them. Removing the last active manager, or deactivating or deleting that person, needs an explicit override from the administrator’s own session. Manager changes are recorded in the activity log, and activity entries name the person who acted.

Managers switch into an organization from a dropdown in the navigation, which shows Acting as and a Back to my account entry. This works even while multi-account switching is off. Owner, Admin, wildcard and API rights are never available while acting for an organization.

Personal API keys

A person who holds the new api_personal_keys permission gets My API keys at /profile/settings/api-keys. These keys act as their owner, with the owner’s own rights. They must expire (at most api_personal_key_max_days, 90 by default) and are limited to api_personal_key_max_count per person (5 by default); both are set on Settings → API. The permission is opt-in and is not given to Admin automatically. No key can be created or rotated in a borrowed session, such as an impersonation.

Library access, members and history

A library can be open to invited members, to all signed-in users, or to anonymous visitors. Changing this needs a confirmation checkbox and is recorded in the activity history. A shared library settings workspace, in the profile and in the admin lists, holds the name and slug, the access setting, members, storage and renditions. Only library owners can appoint or remove Managers; Managers handle Viewers and Contributors. Membership changes are kept in a permanent history that owners and Managers can read in the member dialog, and open media browsers recheck access when a role changes.

Backup storage and verification

Owners can add backup storage to an existing library under Storage and backups. New buckets are tested first, and files are copied and verified in the background, with live progress, retries and per-bucket counts on the Media settings page. A personal Media Activity tab can verify a library’s originals by SHA-256, one check per library every 30 days. Integrations that libraries depend on cannot be removed or disconnected.

Media picker and selection

The media browser has a picker mode for ordered single or multiple selections with limits. MediaGallery takes external_picker={true} to let the host page open its own picker. In the grid, box selection, Shift-click ranges and dragging a whole selection onto a folder or the Trash now work. An optional removal guard lets the host check whether a file is still in use before it is removed. A host can also plug in a focal-point detector (config :phoenix_kit, :focal_point_detector, MyDetector) for face-first crops.

Fixes

Among many fixes: /sitemap.html on a site mounted at the root redirects to /sitemap.xml instead of failing, deleting a file another record still uses answers “in use” instead of crashing the media page, and every message is translated again in all nine languages, about 290 of them new.

Upgrading

Run mix phoenix_kit.update for migrations V226 and V227. Etcher is updated to 0.24.0. Nothing changes for existing organizations until an administrator converts one, and personal API keys stay off until someone is given the permission.

Full release notes: PhoenixKit 3.3.0

3.3.0 · 3 November 2026

The first release on Hex since 3.0.0: it also ships everything listed under 3.0.1 to 3.2.6 below, which were versioned on main but never published. Run mix phoenix_kit.update (V226 and V227).

Added

  • Internal managed-organization creation and conversion, with a required first manager, referral admission, credential revocation, and fresh credentials when converting back. An administrator’s dedicated creation form requires an active first manager; organization details provide conversion controls.

  • Manager lifecycle locks and last-active-manager protection cover grant removal and person deactivation/deletion; leaving an organization without an active manager requires an explicit override from a live own-admin session. Manager changes record activities and account notifications.

  • Managed-organization foundations (V227): manager grants, contact addresses, grant-bound session provenance and invitation kinds. Authentication refuses independent managed-account logins; scopes exclude Owner, Admin, wildcard and API authority.

  • Account mail uses a managed organization’s contact address, and the mailer removes reserved .invalid recipients from To, Cc and Bcc.

  • Session revocation collects dependent organization sessions under row locks and disconnects their sockets after commit, including credential changes, user deletion and calls inside host-owned transactions. Rollbacks and savepoint rollbacks preserve restored sessions.

  • Managed organizations cannot use credential or session settings in embedded profile components, and the manager’s browser does not trigger organization time-zone detection or mismatch alerts. Host-transaction disconnect observers stop after 30 consecutive failed database checks.

  • Organization switching: enter/leave routes, dropdowns in both navs, and a separate durable cookie slot that works while multi-account switching is off. Entry is limited per root user and serializes concurrent requests and revocation; switching away deletes and disconnects the organization token.

  • Shared manager administration in organization details and a non-hideable Managers settings tab while acting. Managers invite by email; administrators can search and add active people. Grant removal and person deactivation or deletion require an explicit own-admin override to leave no active manager.

  • Manager invitations with locked, kind-aware acceptance, scoped cancellation, generic invite responses, per-person/organization rate limits and mail for both existing and new invitees. Kit pages show invitation banners and refresh the organization switcher after acceptance; registration and confirmation automatically accept the manager kind without changing employment.

  • Acting-person attribution in activity metadata and screens, source-browser organization sessions, contact addresses in user/session lists, presence and mentions, managed badges, and switcher translations in all nine locales.

  • Media browser picker mode supports ordered single or multiple selections, selection limits, scoped file checks, and uploads isolated from other browsers.

  • Picker viewers preview files and select or deselect them without changing file details, annotations, or viewer preferences.

  • Optional file removal guards check host references before removal and provide server-side confirmation, usage details, and host-controlled release actions.

  • MediaGallery takes external_picker={true}: the Add tile asks the host LiveView ({:open_picker, %{selected:, mode:, max_count:}}) and the host answers with send_update(…, media_selected: uuids).

  • Storage.removal_plan(:selection, %{files:, folders:, kind:}) plans a bulk removal as one unit.

Changed

  • Update Etcher to 0.24.0.

Fixed

  • An open user library (/admin/libraries/<id>) follows membership changes: a promoted member gets the browser’s tools without a reload, a demoted one loses them, and a removed one is sent back to the list. The media browser no longer keeps readonly/own_files_only from an earlier role once set.

  • The media viewer hides the drawing tools on a file whose annotations would be refused (a viewer, or a contributor on someone else’s file, in a user library; a managed library) instead of dropping the shapes silently.

  • Forms loaded before organization conversion cannot restore passwords, login addresses, Google addresses or forbidden roles. OAuth linking and API-key creation/rotation share conversion’s account lock to prevent credentials from escaping its drain.

  • Settings -> API creates no key, rotates no key and creates no service user in a borrowed session (an impersonation, or an account added to the session): the token would act as that account after the session ends. Keys.create_key/4 and Keys.rotate/4 answer :impersonated to impersonated: true for every key, not only a personal one.

  • A bulk delete with the removal guard on asks about every file the selection makes disappear: a file one selected folder re-homes into another selected folder (or a selected file re-homed into a selected subfolder) is trashed with it, and in the Trash view deleted for good, and was never asked about.

  • The Trash view deletes for good only folders that are in the trash. Renaming, recolouring or describing a folder there refilled the grid with the active folders, each offered “Delete”; Select all in the all-files view no longer picks the folders it does not show.

  • Permanently deleting a file another record still references answers “in use” instead of crashing the media page; a folder delete keeps the folders that still hold such a file.

  • A box selection ends when the button comes up where no pointerup arrives, and a press on the column’s scrollbar starts none; a file found by a search at the root can be dragged to Home.

  • A picker’s uploads are acknowledged to its own resume hook, so their browser copies are released instead of reappearing as “Upload problems” after a reconnect.

  • A scoped media browser refuses the orphan view and “Delete all orphaned” (orphans are the library’s, never a scope’s), and a picker refuses “Delete all orphaned”.

  • With library access revoked mid-session, the refusal closes an open viewer instead of leaving a picker’s viewer on screen until a reload.

  • A library open to “Signed-in users” admits only accounts the site itself admits: an unconfirmed email (while require_email_confirmation is on) or an unmet referral gate no longer reads its files.

  • Rotating an object storage connection’s keys samples up to five existing objects, so one object removed from the bucket no longer refuses every rotation; a bucket whose connection keys became unreadable can be disabled.

  • The avatar menu’s account rows stay inside the menu with a long email.

  • The picker viewer’s limit badge says “Maximum 1 file”.

i18n

  • Every message is translated again in all nine locales: about 290 strings added since the last catalog round trip (library access and membership history, backup storage and verification, managed organizations, the picker, the removal guard, personal API keys, Telegram) were shown in English, and 88 entries per locale served a translation gettext had copied from a similar but different message (in English too: “Manage members” read “Managers”).

PhoenixKit 3.3.0. Install or update: {:phoenix_kit, "~> 3.3"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.