I am creating my own shortcut bar but can't manage the user access
Since you're defining a permission you can make use of the user_access() function to check that the user is allowed to access the shortcut menu. You can actually then use the #access key on your render array to denote whether or not it should be shown:

function shortcat_toolbar_pre_render() {
  $links = shortcat_renderables();

  $links['#attached'] = array('css' =&gt; array(drupal_get_path('module', 'shortcat') . '/shortcat.css'));
  $links['#prefix'] = '&lt;div class="toolbar-shortcats"&gt;';
  $links['#suffix'] = '&lt;/div&gt;';

  $links['#access'] = user_access('administer shortcat');

  return $links;
}


That code will deny access for anyone who doesn't have the administer shortcat permission. All you need to do is make sure the permission is ticked for the editor role in the admin permissions page.

It's worth bearing in mind that user_access() wil always return TRUE if you are logged in as the super user (ID:1). If you need this to be different then the easiest way would be to check that the user physically has the editor role assigned to their account:

global $user;
if (!in_array('edit', $user-&gt;roles)) {
  $links['#access'] = FALSE;
}


Hope that helps.