Skip to content

Commit 0288063

Browse files
Merge pull request #960 from datacite/remove-password-generation
Remove automatic password generation
2 parents 379d2bc + cd2b6f6 commit 0288063

File tree

8 files changed

+1
-110
lines changed

8 files changed

+1
-110
lines changed

app/controllers/change.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,6 @@ export default class ChangeController extends Controller {
3131
togglePassword.classList.toggle('bi-eye');
3232
}
3333

34-
@action
35-
generate() {
36-
let self = this;
37-
let url = ENV.API_URL + '/random';
38-
fetch(url, {
39-
headers: {
40-
Authorization: 'Bearer ' + this.currentUser.get('jwt')
41-
}
42-
})
43-
.then(function (response) {
44-
if (response.ok) {
45-
response.json().then(function (data) {
46-
self.get('model').set('passwordInput', data.phrase);
47-
});
48-
} else {
49-
console.debug(response);
50-
}
51-
})
52-
.catch(function (error) {
53-
console.debug(error);
54-
});
55-
}
56-
5734
@action
5835
submitAction(provider) {
5936
let self = this;

app/controllers/password.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,4 @@ export default class PasswordController extends Controller {
5454
self.router.transitionTo('index');
5555
});
5656
}
57-
58-
@action
59-
generate() {
60-
let self = this;
61-
let url = ENV.API_URL + '/random';
62-
fetch(url, {
63-
headers: {
64-
Authorization: 'Bearer ' + this.currentUser.get('jwt')
65-
}
66-
})
67-
.then(function (response) {
68-
if (response.ok) {
69-
response.json().then(function (data) {
70-
self.get('model').set('passwordInput', data.phrase);
71-
});
72-
} else {
73-
console.debug(response);
74-
}
75-
})
76-
.catch(function (error) {
77-
console.debug(error);
78-
});
79-
}
8057
}

app/controllers/providers/show/change.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,6 @@ export default class ChangeController extends Controller {
3131
togglePassword.classList.toggle('bi-eye');
3232
}
3333

34-
@action
35-
generate() {
36-
let self = this;
37-
let url = ENV.API_URL + '/random';
38-
fetch(url, {
39-
headers: {
40-
Authorization: 'Bearer ' + this.currentUser.get('jwt')
41-
}
42-
})
43-
.then(function (response) {
44-
if (response.ok) {
45-
response.json().then(function (data) {
46-
self.get('model').set('passwordInput', data.phrase);
47-
});
48-
} else {
49-
console.debug(response);
50-
}
51-
})
52-
.catch(function (error) {
53-
console.debug(error);
54-
});
55-
}
56-
5734
@action
5835
submitAction() {
5936
let self = this;

app/controllers/repositories/show/change.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,6 @@ export default class ChangeController extends Controller {
3131
togglePassword.classList.toggle('bi-eye');
3232
}
3333

34-
@action
35-
generateAction() {
36-
let self = this;
37-
let url = ENV.API_URL + '/random';
38-
fetch(url, {
39-
headers: {
40-
Authorization: 'Bearer ' + this.currentUser.get('jwt')
41-
}
42-
})
43-
.then(function (response) {
44-
if (response.ok) {
45-
response.json().then(function (data) {
46-
self.get('model').set('passwordInput', data.phrase);
47-
});
48-
} else {
49-
console.debug(response);
50-
}
51-
})
52-
.catch(function (error) {
53-
console.debug(error);
54-
});
55-
}
56-
5734
@action
5835
submitAction(repository) {
5936
let self = this;

app/templates/change.hbs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
<div class="panel panel-transparent">
99
<div class="panel-body">
1010
<div class="col-md-9 col-md-offset-3"><h3 class="edit">Set Password</h3></div>
11-
12-
<div class="col-md-9 col-md-offset-3"><span class="help-block">Click <a class="action-link" {{action "generate"}} data-test-password-suggestion>here</a> for a password suggestion.</span></div>
13-
11+
1412
<BsForm @formLayout="horizontal" class="form-horizontal" @horizontalLabelGridClass="col-md-3" @model={{this.model}} @onSubmit={{action "submitAction" this.model}} @submitOnEnter={{true}} as |form|>
1513
<form.element @controlType="password" id="password-input" class="form-group" @property="passwordInput" @label="New Password" as |el|> <el.control id="password-input-field" /><i class="bi bi-eye-slash" id="togglePassword" {{action 'togglePassword'}}></i></form.element>
1614
<form.element @controlType="password" id="confirm-password-input" class="form-group" @property="confirmPasswordInput" @label="Confirm Password" as |el|> <el.control id="confirm-password-input-field" /><i class="bi bi-eye-slash" id="toggleConfirmPassword" {{action 'toggleConfirmPassword'}}></i></form.element>

app/templates/password.hbs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,6 @@
1313
<h3 class="title">
1414
Set Password
1515
</h3>
16-
<span class="help-block">
17-
Click
18-
<a
19-
class="action-link"
20-
data-test-password-suggestion
21-
{{action 'generate'}}
22-
>
23-
here
24-
</a>
25-
for a password suggestion.
26-
</span>
2716
<BsForm
2817
@formLayout="vertical"
2918
@model={{this.model}}

app/templates/providers/show/change.hbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
<div class="panel-body">
33
<div class="col-md-9 col-md-offset-3"><h3 class="edit">Set Password</h3></div>
44

5-
<div class="col-md-9 col-md-offset-3"><span class="help-block">Click <a class="action-link" {{action "generate"}} data-test-password-suggestion>here</a> for a password suggestion.</span></div>
6-
75
<BsForm @formLayout="horizontal" class="form-horizontal" @horizontalLabelGridClass="col-md-3" @model={{this.model}} @onSubmit={{action "submitAction"}} @submitOnEnter={{true}} as |form|>
86
<form.element @controlType="password" id="password-input" class="form-group" @property="passwordInput" @label="New Password" as |el| >
97
<el.control id="password-input-field" /><i class="bi bi-eye-slash" id="togglePassword" {{action 'togglePassword'}}></i>

app/templates/repositories/show/change.hbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
<div class="panel-body">
33
<div class="col-md-9 col-md-offset-3">
44
<h3 class="edit">Set Password</h3>
5-
6-
<span class="help-block">Click <a class="action-link" {{action "generateAction"}} data-test-password-suggestion>here</a> for a password suggestion.</span>
75
</div>
86

97
<BsForm @formLayout="horizontal" class="form-horizontal" @horizontalLabelGridClass="col-md-3" @model={{this.model}} @onSubmit={{action "submitAction"}} @submitOnEnter={{true}} as |form|>

0 commit comments

Comments
 (0)