diff --git a/src/api/app/mixins/webui/manage_relationships.rb b/src/api/app/mixins/webui/manage_relationships.rb index e195d18d2c4..fa5821a9582 100644 --- a/src/api/app/mixins/webui/manage_relationships.rb +++ b/src/api/app/mixins/webui/manage_relationships.rb @@ -50,7 +50,7 @@ def remove_role main_object.remove_role(load_obj, Role.find_by_title(params[:role])) main_object.store rescue NotFoundError => e - flash[:error] = e.summary + flash[:error] = e.to_s end respond_to do |format| format.js { render json: 'ok' } diff --git a/src/api/spec/cassettes/Projects/behaves_like_user_tab/user_roles/Remove_non_existant_role.yml b/src/api/spec/cassettes/Projects/behaves_like_user_tab/user_roles/Remove_non_existant_role.yml new file mode 100644 index 00000000000..b86f86aa033 --- /dev/null +++ b/src/api/spec/cassettes/Projects/behaves_like_user_tab/user_roles/Remove_non_existant_role.yml @@ -0,0 +1,178 @@ +--- +http_interactions: +- request: + method: get + uri: http://backend:5352/build/home:user_tab_user/_result?code=unresolvable&view=status + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 404 + message: project 'home user_tab_user' does not exist + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '164' + body: + encoding: UTF-8 + string: | + + project 'home:user_tab_user' does not exist +
404 project 'home:user_tab_user' does not exist
+
+ http_version: + recorded_at: Mon, 12 Feb 2018 09:39:17 GMT +- request: + method: get + uri: http://backend:5352/source/home:user_tab_user/_keyinfo?donotcreatecert=1&withsslcert=1 + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '12' + body: + encoding: UTF-8 + string: "\n" + http_version: + recorded_at: Mon, 12 Feb 2018 09:39:17 GMT +- request: + method: get + uri: http://backend:5352/build/home:user_tab_user/_result?view=summary + body: + encoding: US-ASCII + string: '' + headers: + Content-Type: + - text/plain + Accept-Encoding: + - identity + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 404 + message: project 'home user_tab_user' does not exist + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '164' + body: + encoding: UTF-8 + string: | + + project 'home:user_tab_user' does not exist +
404 project 'home:user_tab_user' does not exist
+
+ http_version: + recorded_at: Mon, 12 Feb 2018 09:39:17 GMT +- request: + method: get + uri: http://backend:5352/build/home:user_tab_user/_result?code=unresolvable&view=status + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 404 + message: project 'home user_tab_user' does not exist + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '164' + body: + encoding: UTF-8 + string: | + + project 'home:user_tab_user' does not exist +
404 project 'home:user_tab_user' does not exist
+
+ http_version: + recorded_at: Mon, 12 Feb 2018 10:23:56 GMT +- request: + method: get + uri: http://backend:5352/build/home:user_tab_user/_result?view=summary + body: + encoding: US-ASCII + string: '' + headers: + Content-Type: + - text/plain + Accept-Encoding: + - identity + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 404 + message: project 'home user_tab_user' does not exist + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '164' + body: + encoding: UTF-8 + string: | + + project 'home:user_tab_user' does not exist +
404 project 'home:user_tab_user' does not exist
+
+ http_version: + recorded_at: Mon, 12 Feb 2018 10:23:56 GMT +recorded_with: VCR 4.0.0