ZoonkWeb.UserAuthorization (Zoonk v0.1.0-dev)

View Source

Authorization plugs for web routes.

This module contains plugs that check if a user has permission to access certain routes based on their organization membership, status, and role.

Summary

Functions

LiveView hooks to check organization membership and admin permissions.

Functions

on_mount(atom, params, session, socket)

LiveView hooks to check organization membership and admin permissions.

on_mount arguments

  • :ensure_org_member - Verifies that the user is a confirmed member of the organization If not, raises a PermissionError.

Examples

on_mount {ZoonkWeb.UserAuthorization, :ensure_org_member}