Openmaize.Authorize

Module to verify that users are authorized to access the requested pages / resources.

Authorization is based on user roles, and so you will need a role entry in your user model.

There are two options:

Examples

Call Authorize without any options:

Plug Openmaize.Authorize

Call Authorize without redirects:

Plug Openmaize.Authorize, redirects: false

Call Authorize and perform an extra check using the function extra_check:

Plug Openmaize.Authorize, check: &extra_check/4
Source

Summary

call(conn, opts)

Verify that the user is authorized to access the requested page / resource

init(opts)

Callback implementation for c:Plug.init/1

Functions

call(conn, opts)

Verify that the user is authorized to access the requested page / resource.

Source
init(opts)

Callback implementation for c:Plug.init/1.

Source