This repository has been archived by the owner on Aug 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #866 from almegdad/0.4.0
Reopened: Force Username & Email to Lowercase + Remove Sensitive Data
- Loading branch information
Showing
9 changed files
with
71 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
|
||
// Users directive used to force lowercase input | ||
angular.module('users').directive('lowercase', function () { | ||
return { | ||
require: 'ngModel', | ||
link: function (scope, element, attrs, modelCtrl) { | ||
modelCtrl.$parsers.push(function (input) { | ||
return input ? input.toLowerCase() : ''; | ||
}); | ||
element.css('text-transform', 'lowercase'); | ||
} | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 18 additions & 18 deletions
36
modules/users/client/views/password/forgot-password.client.view.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
<section class="row" ng-controller="PasswordController"> | ||
<h3 class="col-md-12 text-center">Restore your password</h3> | ||
<p class="small text-center">Enter your account username.</p> | ||
<div class="col-xs-offset-2 col-xs-8 col-md-offset-5 col-md-2"> | ||
<form ng-submit="askForPasswordReset()" class="form-horizontal" autocomplete="off"> | ||
<fieldset> | ||
<h3 class="col-md-12 text-center">Restore your password</h3> | ||
<p class="small text-center">Enter your account username.</p> | ||
<div class="col-xs-offset-2 col-xs-8 col-md-offset-5 col-md-2"> | ||
<form ng-submit="askForPasswordReset()" class="form-horizontal" autocomplete="off"> | ||
<fieldset> | ||
<div class="form-group"> | ||
<input type="text" id="username" name="username" class="form-control" ng-model="credentials.username" placeholder="Username"> | ||
<input type="text" id="username" name="username" class="form-control" ng-model="credentials.username" placeholder="Username" lowercase> | ||
</div> | ||
<div class="text-center form-group"> | ||
<button type="submit" class="btn btn-primary">Submit</button> | ||
</div> | ||
<div ng-show="error" class="text-center text-danger"> | ||
<strong>{{error}}</strong> | ||
</div> | ||
<div ng-show="success" class="text-center text-success"> | ||
<strong>{{success}}</strong> | ||
</div> | ||
</fieldset> | ||
</form> | ||
</div> | ||
<div class="text-center form-group"> | ||
<button type="submit" class="btn btn-primary">Submit</button> | ||
</div> | ||
<div ng-show="error" class="text-center text-danger"> | ||
<strong>{{error}}</strong> | ||
</div> | ||
<div ng-show="success" class="text-center text-success"> | ||
<strong>{{success}}</strong> | ||
</div> | ||
</fieldset> | ||
</form> | ||
</div> | ||
</section> |
48 changes: 24 additions & 24 deletions
48
modules/users/client/views/password/reset-password.client.view.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
<section class="row" ng-controller="PasswordController"> | ||
<h3 class="col-md-12 text-center">Reset your password</h3> | ||
<div class="col-xs-offset-2 col-xs-8 col-md-offset-5 col-md-2"> | ||
<form ng-submit="resetUserPassword()" class="signin form-horizontal" autocomplete="off"> | ||
<fieldset> | ||
<div class="form-group"> | ||
<label for="newPassword">New Password</label> | ||
<input type="password" id="newPassword" name="newPassword" class="form-control" ng-model="passwordDetails.newPassword" placeholder="New Password"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="verifyPassword">Verify Password</label> | ||
<input type="password" id="verifyPassword" name="verifyPassword" class="form-control" ng-model="passwordDetails.verifyPassword" placeholder="Verify Password"> | ||
</div> | ||
<div class="text-center form-group"> | ||
<button type="submit" class="btn btn-lg btn-primary">Update Password</button> | ||
</div> | ||
<div ng-show="error" class="text-center text-danger"> | ||
<strong>{{error}}</strong> | ||
</div> | ||
<div ng-show="success" class="text-center text-success"> | ||
<strong>{{success}}</strong> | ||
</div> | ||
</fieldset> | ||
</form> | ||
</div> | ||
<h3 class="col-md-12 text-center">Reset your password</h3> | ||
<div class="col-xs-offset-2 col-xs-8 col-md-offset-5 col-md-2"> | ||
<form ng-submit="resetUserPassword()" class="signin form-horizontal" autocomplete="off"> | ||
<fieldset> | ||
<div class="form-group"> | ||
<label for="newPassword">New Password</label> | ||
<input type="password" id="newPassword" name="newPassword" class="form-control" ng-model="passwordDetails.newPassword" placeholder="New Password"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="verifyPassword">Verify Password</label> | ||
<input type="password" id="verifyPassword" name="verifyPassword" class="form-control" ng-model="passwordDetails.verifyPassword" placeholder="Verify Password"> | ||
</div> | ||
<div class="text-center form-group"> | ||
<button type="submit" class="btn btn-lg btn-primary">Update Password</button> | ||
</div> | ||
<div ng-show="error" class="text-center text-danger"> | ||
<strong>{{error}}</strong> | ||
</div> | ||
<div ng-show="success" class="text-center text-success"> | ||
<strong>{{success}}</strong> | ||
</div> | ||
</fieldset> | ||
</form> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters