Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix adding security groups to an existing instance

Commit 4c34f5f introduced a
regression making it impossible to add a security group to
an existing instance.

In the javascript membership module, make sure new members are still
assigned the default role even if the role dropdown is not displayed
(as is the case for the instance security group add/remove view).

Fixes bug 1158037.

Change-Id: I986f7296e97a08d5e9141fe0739d4e028e066fc1
(cherry picked from commit 64c0ddf)
  • Loading branch information...
commit 293e1c304700e6cf48f73bf2208083fbd68d9505 1 parent f95dd00
Kieran Spear conkiztador authored jpichon committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 horizon/static/horizon/js/horizon.projects.js
4 horizon/static/horizon/js/horizon.projects.js
View
@@ -351,13 +351,13 @@ horizon.projects = {
var user_el = $(this).parent().parent();
if (available) {
+ var default_role = horizon.projects.default_role_id;
$(this).text("-");
$(".project_members").append(user_el);
+ horizon.projects.add_user_to_role(user_id, default_role);
if (horizon.projects.has_roles) {
- var default_role = horizon.projects.default_role_id;
$(this).parent().siblings(".role_options").show();
- horizon.projects.add_user_to_role(user_id, default_role);
horizon.projects.update_user_role_dropdown(user_id, [default_role], user_el);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.