View Source PlausibleWeb.Plugs.AuthorizeSiteAccess (Plausible v0.0.1)

Plug restricting access to site and shared link, when present.

In order to permit access to site regardless of role:

plug AuthorizeSiteAccess

or

plug AuthorizeSiteAccess, :all_roles

Permit access for a subset of roles only:

plug AuthorizeSiteAccess, [:admin, :owner, :super_admin]

Permit access using a custom site param:

plug AuthorizeSiteAccess, {[:admin, :owner, :super_admin], "site_id"}

or in case where any role is allowed:

plug AuthorizeSiteAccess, {:all_roles, "site_id"}

Summary

Functions