From c8a450cdf07750f456fb686991c71d27a698b11e Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 20 May 2014 17:52:03 -0400 Subject: [PATCH 1/2] Make sure the create robot account error dialog shows a proper message --- static/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/app.js b/static/js/app.js index 0ecbb8842..d6831427d 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -61,7 +61,7 @@ function getFirstTextLine(commentString) { function createRobotAccount(ApiService, is_org, orgname, name, callback) { ApiService.createRobot(is_org ? orgname : null, null, {'robot_shortname': name}).then(callback, function(resp) { bootbox.dialog({ - "message": resp.data ? resp.data : 'The robot account could not be created', + "message": resp.data ? resp.data['message'] : 'The robot account could not be created', "title": "Cannot create robot account", "buttons": { "close": { From 701033751e68f86d54d96bd23af19e56c476605f Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 20 May 2014 17:58:39 -0400 Subject: [PATCH 2/2] Fix the robot pattern to make sure it does a length check --- static/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/app.js b/static/js/app.js index d6831427d..b20c4b082 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -1,5 +1,5 @@ var TEAM_PATTERN = '^[a-zA-Z][a-zA-Z0-9]+$'; -var ROBOT_PATTERN = '^[a-zA-Z][a-zA-Z0-9]+$'; +var ROBOT_PATTERN = '^[a-zA-Z][a-zA-Z0-9]{3,29}$'; function getRestUrl(args) { var url = '';