Openmaize.Authorize

Plug that performs a basic check 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 is one option:

Examples

Call Authorize without any options:

plug Openmaize.Authorize

Call Authorize without redirects:

plug Openmaize.Authorize, redirects: false
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