Packages

This is a CMS written in Elixir. Aims to be the great open-source ecommerce and/or startup solution for those who are searching for a performance and stability on top of modern technologies like React and Elixir.

Current section

Files

Jump to
lyn web models role_checker.ex
Raw

web/models/role_checker.ex

defmodule Lyn.RoleChecker do
alias Lyn.Repo
alias Lyn.Role
def is_admin?(user) do
(role = Repo.get(Role, user.role_id)) && role.admin
end
end