GitHub PullRequestReviewCommentEvent at 2014-12-17 17:57:43
Repository: dcm-angular-ui
Actor: mmmpie
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/pulls/comments/21990396","id":21990396,"diff_hunk":"@@ -0,0 +1,66 @@\n+'use strict';\n+\n+angular.module('dcm-ui.password')\n+\n+/**\n+ * @ngdoc directive\n+ * @name dcmPassword\n+ * @module dcm-ui.password\n+ * @restrict A\n+ *\n+ * @description\n+ * Provides a password validator implementing modified Stanford password rules\n+ *\n+ * @param {string=} dcm-password-strict - turns off the progressive password validation rules\n+ */\n+\n+  .directive('dcmPassword', [function () {\n+    return {\n+      restrict: 'A',\n+      require: 'ngModel',\n+      scope: {\n+        strict: '=dcmPasswordStrict'\n+      },\n+      link: function(scope, elem, attrs, ctrl) {\n+\n+        // define 3 regexes to eval based on length\n+        var REQUIRED_PATTERNS = [\n+\n+            /^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9]).+/, // num, upper/lower letters, special chars\n+            /^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{12,15}$/, // num, upper/lower letters\n+            /^(?=.*[a-z])(?=.*[A-Z]).{16,19}$/ // upper/lower letters\n+        ];\n+\n+        ctrl.$validators.passwordCharacters = function(value) {\n+\n+          value = value || '';\n+\n+          // default password requires num, upper/lower letters, special chars\n+          var valid = REQUIRED_PATTERNS[0].test(value);\n+\n+          /* if password rules not strict, the following progressive rules apply\n+             password length 12-15 requires num, upper/lower letters\n+             password length 16-19 requires upper/lower letters\n+             password length >19 has no requirements\n+          */\n+          if (!scope.strict && value.length > 11){\n+            if (value.length < 16) {\n+              valid = REQUIRED_PATTERNS[1].test(value);","path":"src/password/directives/dcmPassword.js","position":48,"original_position":48,"commit_id":"a7695ccae0084d423106ac81d7a3a139a11acf68","original_commit_id":"a7695ccae0084d423106ac81d7a3a139a11acf68","user":{"login":"mmmpie","id":326847,"avatar_url":"https://avatars.githubusercontent.com/u/326847?v=3","gravatar_id":"","url":"https://api.github.com/users/mmmpie","html_url":"https://github.com/mmmpie","followers_url":"https://api.github.com/users/mmmpie/followers","following_url":"https://api.github.com/users/mmmpie/following{/other_user}","gists_url":"https://api.github.com/users/mmmpie/gists{/gist_id}","starred_url":"https://api.github.com/users/mmmpie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmmpie/subscriptions","organizations_url":"https://api.github.com/users/mmmpie/orgs","repos_url":"https://api.github.com/users/mmmpie/repos","events_url":"https://api.github.com/users/mmmpie/events{/privacy}","received_events_url":"https://api.github.com/users/mmmpie/received_events","type":"User","site_admin":false},"body":"Once explicit knowledge of array indexes is removed the rules can be overridden by passing in a parameter.","created_at":"2014-12-17T17:57:43Z","updated_at":"2014-12-17T17:57:43Z","html_url":"https://github.com/dell-oss/dcm-angular-ui/pull/2#discussion_r21990396","pull_request_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/dell-oss/dcm-angular-ui/pulls/comments/21990396"},"html":{"href":"https://github.com/dell-oss/dcm-angular-ui/pull/2#discussion_r21990396"},"pull_request":{"href":"https://api.github.com/repos/dell-oss/dcm-angular-ui/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/pulls/2","id":26185438,"html_url":"https://github.com/dell-oss/dcm-angular-ui/pull/2","diff_url":"https://github.com/dell-oss/dcm-angular-ui/pull/2.diff","patch_url":"https://github.com/dell-oss/dcm-angular-ui/pull/2.patch","issue_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/issues/2","number":2,"state":"open","locked":false,"title":"Add password directive","user":{"login":"jasondbaker","id":4176562,"avatar_url":"https://avatars.githubusercontent.com/u/4176562?v=3","gravatar_id":"","url":"https://api.github.com/users/jasondbaker","html_url":"https://github.com/jasondbaker","followers_url":"https://api.github.com/users/jasondbaker/followers","following_url":"https://api.github.com/users/jasondbaker/following{/other_user}","gists_url":"https://api.github.com/users/jasondbaker/gists{/gist_id}","starred_url":"https://api.github.com/users/jasondbaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasondbaker/subscriptions","organizations_url":"https://api.github.com/users/jasondbaker/orgs","repos_url":"https://api.github.com/users/jasondbaker/repos","events_url":"https://api.github.com/users/jasondbaker/events{/privacy}","received_events_url":"https://api.github.com/users/jasondbaker/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-12-16T22:26:11Z","updated_at":"2014-12-17T17:57:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"57aa61286ac56a8b965f1d48c94ed95174da5a79","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/pulls/2/commits","review_comments_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/pulls/2/comments","review_comment_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/pulls/comments/{number}","comments_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/issues/2/comments","statuses_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/statuses/a7695ccae0084d423106ac81d7a3a139a11acf68","head":{"label":"jasondbaker:feature/dcm-password","ref":"feature/dcm-password","sha":"a7695ccae0084d423106ac81d7a3a139a11acf68","user":{"login":"jasondbaker","id":4176562,"avatar_url":"https://avatars.githubusercontent.com/u/4176562?v=3","gravatar_id":"","url":"https://api.github.com/users/jasondbaker","html_url":"https://github.com/jasondbaker","followers_url":"https://api.github.com/users/jasondbaker/followers","following_url":"https://api.github.com/users/jasondbaker/following{/other_user}","gists_url":"https://api.github.com/users/jasondbaker/gists{/gist_id}","starred_url":"https://api.github.com/users/jasondbaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasondbaker/subscriptions","organizations_url":"https://api.github.com/users/jasondbaker/orgs","repos_url":"https://api.github.com/users/jasondbaker/repos","events_url":"https://api.github.com/users/jasondbaker/events{/privacy}","received_events_url":"https://api.github.com/users/jasondbaker/received_events","type":"User","site_admin":false},"repo":{"id":28095824,"name":"dcm-angular-ui","full_name":"jasondbaker/dcm-angular-ui","owner":{"login":"jasondbaker","id":4176562,"avatar_url":"https://avatars.githubusercontent.com/u/4176562?v=3","gravatar_id":"","url":"https://api.github.com/users/jasondbaker","html_url":"https://github.com/jasondbaker","followers_url":"https://api.github.com/users/jasondbaker/followers","following_url":"https://api.github.com/users/jasondbaker/following{/other_user}","gists_url":"https://api.github.com/users/jasondbaker/gists{/gist_id}","starred_url":"https://api.github.com/users/jasondbaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasondbaker/subscriptions","organizations_url":"https://api.github.com/users/jasondbaker/orgs","repos_url":"https://api.github.com/users/jasondbaker/repos","events_url":"https://api.github.com/users/jasondbaker/events{/privacy}","received_events_url":"https://api.github.com/users/jasondbaker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jasondbaker/dcm-angular-ui","description":"A collection of AngularJS UI components developed for the Dell Cloud Manager.","fork":true,"url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui","forks_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/forks","keys_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/teams","hooks_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/hooks","issue_events_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/issues/events{/number}","events_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/events","assignees_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/assignees{/user}","branches_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/branches{/branch}","tags_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/tags","blobs_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/languages","stargazers_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/stargazers","contributors_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/contributors","subscribers_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/subscribers","subscription_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/subscription","commits_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/issues/comments/{number}","contents_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/contents/{+path}","compare_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/merges","archive_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/downloads","issues_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/issues{/number}","pulls_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/labels{/name}","releases_url":"https://api.github.com/repos/jasondbaker/dcm-angular-ui/releases{/id}","created_at":"2014-12-16T16:33:09Z","updated_at":"2014-12-16T16:33:09Z","pushed_at":"2014-12-16T22:25:06Z","git_url":"git://github.com/jasondbaker/dcm-angular-ui.git","ssh_url":"git@github.com:jasondbaker/dcm-angular-ui.git","clone_url":"https://github.com/jasondbaker/dcm-angular-ui.git","svn_url":"https://github.com/jasondbaker/dcm-angular-ui","homepage":"http://dell-oss.github.io/dcm-angular-ui/","size":4078,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"dell-oss:develop","ref":"develop","sha":"c77a5a10b638ce5cb78c8fef936a85bc8488bad0","user":{"login":"dell-oss","id":7362978,"avatar_url":"https://avatars.githubusercontent.com/u/7362978?v=3","gravatar_id":"","url":"https://api.github.com/users/dell-oss","html_url":"https://github.com/dell-oss","followers_url":"https://api.github.com/users/dell-oss/followers","following_url":"https://api.github.com/users/dell-oss/following{/other_user}","gists_url":"https://api.github.com/users/dell-oss/gists{/gist_id}","starred_url":"https://api.github.com/users/dell-oss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dell-oss/subscriptions","organizations_url":"https://api.github.com/users/dell-oss/orgs","repos_url":"https://api.github.com/users/dell-oss/repos","events_url":"https://api.github.com/users/dell-oss/events{/privacy}","received_events_url":"https://api.github.com/users/dell-oss/received_events","type":"Organization","site_admin":false},"repo":{"id":21996706,"name":"dcm-angular-ui","full_name":"dell-oss/dcm-angular-ui","owner":{"login":"dell-oss","id":7362978,"avatar_url":"https://avatars.githubusercontent.com/u/7362978?v=3","gravatar_id":"","url":"https://api.github.com/users/dell-oss","html_url":"https://github.com/dell-oss","followers_url":"https://api.github.com/users/dell-oss/followers","following_url":"https://api.github.com/users/dell-oss/following{/other_user}","gists_url":"https://api.github.com/users/dell-oss/gists{/gist_id}","starred_url":"https://api.github.com/users/dell-oss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dell-oss/subscriptions","organizations_url":"https://api.github.com/users/dell-oss/orgs","repos_url":"https://api.github.com/users/dell-oss/repos","events_url":"https://api.github.com/users/dell-oss/events{/privacy}","received_events_url":"https://api.github.com/users/dell-oss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dell-oss/dcm-angular-ui","description":"A collection of AngularJS UI components developed for the Dell Cloud Manager.","fork":false,"url":"https://api.github.com/repos/dell-oss/dcm-angular-ui","forks_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/forks","keys_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/teams","hooks_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/hooks","issue_events_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/issues/events{/number}","events_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/events","assignees_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/assignees{/user}","branches_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/branches{/branch}","tags_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/tags","blobs_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/languages","stargazers_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/stargazers","contributors_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/contributors","subscribers_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/subscribers","subscription_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/subscription","commits_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/issues/comments/{number}","contents_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/contents/{+path}","compare_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/merges","archive_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/downloads","issues_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/issues{/number}","pulls_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/labels{/name}","releases_url":"https://api.github.com/repos/dell-oss/dcm-angular-ui/releases{/id}","created_at":"2014-07-18T22:52:29Z","updated_at":"2014-12-17T01:05:48Z","pushed_at":"2014-12-17T01:05:47Z","git_url":"git://github.com/dell-oss/dcm-angular-ui.git","ssh_url":"git@github.com:dell-oss/dcm-angular-ui.git","clone_url":"https://github.com/dell-oss/dcm-angular-ui.git","svn_url":"https://github.com/dell-oss/dcm-angular-ui","homepage":"http://dell-oss.github.io/dcm-angular-ui/","size":4078,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/dell-oss/dcm-angular-ui/pulls/2"},"html":{"href":"https://github.com/dell-oss/dcm-angular-ui/pull/2"},"issue":{"href":"https://api.github.com/repos/dell-oss/dcm-angular-ui/issues/2"},"comments":{"href":"https://api.github.com/repos/dell-oss/dcm-angular-ui/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/dell-oss/dcm-angular-ui/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/dell-oss/dcm-angular-ui/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/dell-oss/dcm-angular-ui/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/dell-oss/dcm-angular-ui/statuses/a7695ccae0084d423106ac81d7a3a139a11acf68"}}}}