<% if user_signed_in? %>
  <nav class="navbar navbar-default">
    <div class="container-fluid">
      <ul class="nav navbar-nav">
        <%= tab("Orders", orders_path, active == "orders") %>

        <% if current_user.super_admin? %>
          <%= tab("Inventory", items_path, active == "inventory") %>
        <% end %>

        <% if current_user.can_create_organization? || current_user.can_update_organization? %>
          <%= tab("Organizations", organizations_path, active == "organizations") %>
        <% end %>

        <% if current_user.can_invite_user? || current_user.can_update_user? %>
          <%= tab("Users", users_path, active == "users") %>
        <% end %>
        <li class="visible-xs"><%= link_to "Logout", destroy_user_session_path, method: :delete %></li>
      </ul>

      <ul class="nav navbar-nav navbar-right hidden-xs">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
            <%= current_user.email %>
            <span class="caret"></span>
          </a>
          <ul class="dropdown-menu">
            <li><a href="<%= edit_user_path(current_user) %>">Edit User</a></li>
            <li><%= link_to "Logout", destroy_user_session_path, method: :delete %></li>
          </ul>
        </li>
      </ul>
    </div>
  </nav>
<% end %>

<% if user_signed_in? %>
  <nav class="navbar navbar-default">
    <div class="container-fluid">
      <ul class="nav navbar-nav">
        <%= tab("Orders", orders_path, active == "orders") %>

        <% if current_user.can_view_or_edit_items? %>
          <%= tab("Inventory", items_path, active == "inventory") %>
        <% end %>

        <% if current_user.can_create_organization? || current_user.can_update_organization? %>
          <%= tab("Organizations", organizations_path, active == "organizations") %>
        <% end %>

        <% if current_user.can_invite_user? || current_user.can_update_user? %>
          <%= tab("Users", users_path, active == "users") %>
        <% end %>
        <li class="visible-xs"><%= link_to "Logout", destroy_user_session_path, method: :delete %></li>
      </ul>

      <ul class="nav navbar-nav navbar-right hidden-xs">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
            <%= current_user.email %>
            <span class="caret"></span>
          </a>
          <ul class="dropdown-menu">
            <li><a href="<%= edit_user_path(current_user) %>">Edit User</a></li>
            <li><%= link_to "Logout", destroy_user_session_path, method: :delete %></li>
          </ul>
        </li>
      </ul>
    </div>
  </nav>
<% end %>

Use the permission method rather than generic super_admin? method
Use the permission method rather than generic super_admin? method
