diff --git a/includes/rules.core.inc b/includes/rules.core.inc
index 86d3daa..248e6aa 100644
--- a/includes/rules.core.inc
+++ b/includes/rules.core.inc
@@ -38,6 +38,14 @@ class RulesEntityController extends EntityAPIControllerExportable {
       $modules[$row->id][] = $row->module;
     }
 
+    $result = db_select('rules_roles')
+      ->fields('rules_roles', array('id', 'rid'))
+      ->condition('id', $ids, 'IN')
+      ->execute();
+    foreach ($result as $row) {
+      $roles[$row->id][$row->rid] = $row->rid;
+    }
+
     $entities = array();
     foreach ($queried_entities as $record) {
       $entity = $record->data;
@@ -49,6 +57,7 @@ class RulesEntityController extends EntityAPIControllerExportable {
       // Add any tags or dependencies.
       $entity->dependencies = isset($modules[$entity->id]) ? $modules[$entity->id] : array();
       $entity->tags = isset($tags[$entity->id]) ? $tags[$entity->id] : array();
+      $entity->roles = isset($roles[$entity->id]) ? $roles[$entity->id] : array();
       $entities[$entity->id] = $entity;
     }
     $queried_entities = $entities;
@@ -134,6 +143,7 @@ class RulesEntityController extends EntityAPIControllerExportable {
 
     $return = parent::save($rules_config, $transaction);
     $this->storeTags($rules_config);
+    $this->storeRoles($rules_config);
     if ($rules_config instanceof RulesTriggerableInterface) {
       $this->storeEvents($rules_config);
     }
@@ -158,6 +168,22 @@ class RulesEntityController extends EntityAPIControllerExportable {
   }
 
   /**
+   * Save role information to the rules_roles table.
+   */
+  protected function storeRoles($rules_config) {
+    db_delete('rules_roles')
+      ->condition('id', $rules_config->id)
+      ->execute();
+    if (!empty($rules_config->roles)) {
+      foreach ($rules_config->roles as $rid) {
+        db_insert('rules_roles')
+          ->fields(array('id', 'rid'), array($rules_config->id, $rid))
+          ->execute();
+      }
+    }
+  }
+
+  /**
    * Save event information to the rules_trigger table.
    */
   protected function storeEvents(RulesTriggerableInterface $rules_config) {
diff --git a/modules/rules_core.rules.inc b/modules/rules_core.rules.inc
index 6f00996..dfa0bc7 100644
--- a/modules/rules_core.rules.inc
+++ b/modules/rules_core.rules.inc
@@ -299,11 +299,15 @@ function rules_element_invoke_component_features_export(&$export, &$pipe, $modul
  * Access callback for the invoke component condition/action.
  */
 function rules_element_invoke_component_access_callback($type, $name) {
+  global $user;
   // Only allow access to the action/condition if the user has access to the
   // component.
   // Cut of the leading 'component_' from the action name.
   $component = rules_config_load(substr($name, 10));
-  return $component && $component->access();
+  // If the component doesn't have any component selected, access should be
+  // granted.
+  $component_access = empty($component->roles) ? TRUE : array_intersect(array_keys($component->roles), array_keys($user->roles));
+  return $component && $component->access() && (user_access('bypass rules access', $user) || $component_access);
 }
 
 /**
diff --git a/rules.install b/rules.install
index 370226e..2c730b1 100644
--- a/rules.install
+++ b/rules.install
@@ -167,6 +167,27 @@ function rules_schema() {
       'id' => array('rules_config' => 'id'),
     ),
   );
+  $schema['rules_roles'] = array(
+    'fields' => array(
+      'id' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'description' => 'The primary identifier of the configuration.',
+      ),
+      'rid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'description' => 'Unique role id.',
+      ),
+    ),
+    'primary key' => array('id', 'rid'),
+    'foreign keys' => array(
+      'id' => array('rules_config' => 'id'),
+      'rid' => array('role' => 'rid'),
+    ),
+  );
   $schema['cache_rules'] = drupal_get_schema_unprocessed('system', 'cache');
   $schema['cache_rules']['description'] = 'Cache table for the rules engine to store configured items.';
   return $schema;
@@ -406,3 +427,31 @@ function rules_update_7206() {
 function rules_update_7207() {
   // The update system is going to flush all caches anyway, so nothing to do.
 }
+
+/**
+ * Create roles table to store component-role to manage access.
+ */
+function rules_update_7208() {
+  $schema['rules_roles'] = array(
+    'fields' => array(
+      'id' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'description' => 'The primary identifier of the configuration.',
+      ),
+      'rid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'description' => 'Unique role id.',
+      ),
+    ),
+    'primary key' => array('id', 'rid'),
+    'foreign keys' => array(
+      'id' => array('rules_config' => 'id'),
+      'rid' => array('role' => 'rid'),
+    ),
+  );
+  db_create_table('rules_roles', $schema['rules_roles']);
+}
diff --git a/ui/ui.core.inc b/ui/ui.core.inc
index bc69ac4..323e319 100644
--- a/ui/ui.core.inc
+++ b/ui/ui.core.inc
@@ -480,6 +480,23 @@ class RulesPluginUI extends FacesExtender implements RulesPluginUIInterface {
       );
     }
 
+    // Display roles to manage access.
+    $role_options = array_map('check_plain', user_roles());
+    $form['settings']['roles'] = array(
+      '#type' => 'fieldset',
+      '#collapsible' => TRUE,
+      '#collapsed' => TRUE,
+      '#prefix' => '<div id="rules-component-roles">',
+      '#suffix' => '</div>',
+      '#title' => t('Roles'),
+      '#description' => t('Select the roles that will have access to execute this component. Selecting none will grant access to all roles.'),
+    );
+    $form['settings']['roles']['items'] = array(
+      '#type' => 'checkboxes',
+      '#options' => $role_options,
+      '#default_value' => $this->element->roles,
+    );
+
     // TODO: Attach field form thus description.
   }
 
@@ -522,6 +539,15 @@ class RulesPluginUI extends FacesExtender implements RulesPluginUIInterface {
       }
       unset($input['vars']);
     }
+
+    $this->element->roles = array();
+    if (isset($form_values['roles']['items'])) {
+      foreach ($form_values['roles']['items'] as $item) {
+        if ($item) {
+          $this->element->roles[$item] = $item;
+        }
+      }
+    }
   }
 
   public function settingsFormValidate($form, &$form_state) {
