コード例 #1
0
        private DashBoard CarregaDashBoard(Permissao menu, IEnumerable <Permissao> roles, bool exigeTurma = true, string descricao = null)
        {
            var atributo = menu.GetAttribute <PermissaoMenuAttribute>();

            return(new DashBoard()
            {
                Descricao = descricao ?? atributo.Menu,
                UsuarioTemPermissao = roles.Contains(menu),
                TurmaObrigatoria = exigeTurma,
                Icone = atributo.IconeDashBoard,
                Rota = atributo.Url,
            });
        }