php - symfony toolbar missing on login -


i went through symfony blog tutorial @ http://tutorial.symblog.co.uk/index.html , wanted extend require authentication. loosely followed http://symfony.com/doc/current/cookbook/security/entity_provider.html, created new bundle (i want extract out common area later) , things working fine. problem on login page, not show symfony toolbar (it everywhere else), rest of page displays expect.

any ideas? in advance.

my login.html.twig:

{% extends '::base.html.twig' %}  {% block title %}please login{% endblock %}  {% block body %}     {% if error %}         <div class="error-message">{{ error.message }}</div>     {% endif %}      <form action="{{ path('login_check') }}" method="post">         <label for="username">e-mail address:</label>         <input type="text" id="username" name="_username" value="{{ last_username }}"/>          <label for="password">password:</label>         <input type="password" id="password" name="_password"/>          {#             if want control url user             redirected on success (more details below)             <input type="hidden" name="_target_path" value="/account" />         #}          <button type="submit">login</button>     </form>  {% endblock %} 

my ::base.html.twig:

<!-- app/resources/views/base.html.twig --> <!doctype html> <html> <head>     <meta http-equiv="content-type" content="text/html"     ; charset=utf-8" />     <title>{% block title %}symblog{% endblock %} - symblog</title>     <!--[if lt ie 9]>     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>     <![endif]-->     {% block stylesheets %}         <link href='http://fonts.googleapis.com/css?family=irish+grover' rel='stylesheet' type='text/css'>         <link href='http://fonts.googleapis.com/css?family=la+belle+aurore' rel='stylesheet' type='text/css'>         <link href="{{ asset('css/screen.css') }}" type="text/css" rel="stylesheet"/>     {% endblock %}     <link rel="shortcut icon" href="{{ asset('favicon.ico') }}"/> </head> <body>  <section id="wrapper">     <header id="header">         <div class="top">             {% block navigation %}                 <nav>                     <ul class="navigation">                         <li><a href="{{ path('bloggerblogbundle_homepage') }}">home</a></li>                         <li><a href="{{ path('bloggerblogbundle_about') }}">about</a></li>                         <li><a href="{{ path('bloggerblogbundle_contact') }}">contact</a></li>                         {% if app.user %}                             <li><a href="{{ path('logout') }}">logout {{ app.user.username }}</a></li>                         {% endif %}                     </ul>                 </nav>             {% endblock %}         </div>          <h2>{% block blog_title %}<a href="{{ path('bloggerblogbundle_homepage') }}">symblog</a>{% endblock %}</h2>          <h3>{% block blog_tagline %}<a href="{{ path('bloggerblogbundle_homepage') }}">creating blog in                 symfony2</a>{% endblock %}</h3>     </header>      <section class="main-col">         {% block body %}{% endblock %}     </section>     <aside class="sidebar">         {% block sidebar %}{% endblock %}     </aside>      <div id="footer">         {% block footer %}             symfony2 blog tutorial - created <a href="https://github.com/dsyph3r">dsyph3r</a>         {% endblock %}     </div> </section>  {% block javascripts %}{% endblock %} </body> </html> 

edited: found answer... under access_control.

nothing being cut off. i've heard it's because toolbar isn't setup under access, i'm not entirely sure how that. here's security.yml:

security:     encoders:         database\userbundle\entity\user:             algorithm:          sha1             encode_as_base64:   false             iterations:         1      role_hierarchy:         role_admin:       role_user         role_super_admin: [role_user, role_admin, role_allowed_to_switch]      providers:         administrators:             entity: { class: databaseuserbundle:user, property: email }      firewalls:         login_firewall:             pattern:    ^/login$             anonymous:  ~         secured_area:             pattern:    ^/             anonymous:  ~             form_login:                 login_path:                     login                 check_path:                     login_check                 always_use_default_target_path: true                 default_target_path:            /             logout:                 path:   /logout                 target: /      access_control:         - { path: /_wdt/.*, role: is_authenticated_anonymously }  ### these 2 lines needed         - { path: /_profiler/.*, role: is_authenticated_anonymously }### these 2 lines needed         - { path: ^/login, roles: is_authenticated_anonymously }         - { path: ^/, roles: role_user } 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -