title: Create NavBar to do Action
body: <p>I'm learning to use React-Native and I'm in trouble with this kind of problem. </p>
  
  <p>What I should do is to create a Navbar custom for a page that allows me to insert on the right a text that is visible depending on the user's role. (In particular, this text allows you to logout to a specific user role.)</p>
  
  <p>At the moment I have implemented this functionality for all the user. </p>
  
  <p>In the page where I put the Route and the Scene (<em>I Use Router-flux</em>), I have initialized the logout: </p>
  
  <pre><code>static logout() {
  User.clearLoggedUser();
  App.redirectLogout();
  }
  
  
  
  render() {
      return (
        &lt;Router&gt;
        &lt;Scene
              key="homepage"
              component={Homepage}
              type="reset"
              leftTitle="Home"
              leftButtonTextStyle={{ color: "#ffffff" }}
              onLeft={() =&gt; Actions.authentication()}
              rightButtonTextStyle={{ color: "#ffffff" }}
              rightTitle="Logout"
              onRight={() =&gt; App.logout()}
              navigationBarStyle={{ backgroundColor: "#64c7c0" }}
            /&gt;
  </code></pre>
  
  <p>So, in the Homepage I have ,in the top right of the app, the logout (but it is for everything not for some Role).</p>
  
  <p>In the Homepage I take the roles:</p>
  
  <pre><code>class Homepage extends Component {
      constructor(props) {
          super(props);
      }
      render() {
          const Roles = global.user.data.Person.Roles
  </code></pre>
  
  <p>So if {Roles} is equal to "Some Role" he shouldn't click (and see) the logout button. </p>
  
  <p>How can I do? Thanks for your help.</p>