ru.coon 2.6.3 → 2.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# Version 2.6.5, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/5695d2c215ad6469aacd802ca46a536c81845c35)
|
|
2
|
+
* ## Fixes
|
|
3
|
+
* <span style='color:red'>Fix:TR-67289 refactoring authorization</span> ([8bdc4b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8bdc4b11e7443b819b52c4eef8e0cc2d9c8f3f5b))
|
|
4
|
+
|
|
5
|
+
* update: CHANGELOG.md ([490d0e], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/490d0eb96a199419068bdf69e20aa0db63a6180d))
|
|
6
|
+
|
|
7
|
+
# Version 2.6.4, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f9a1013bbcc9c01ba7baa130b16648d222144ea0)
|
|
8
|
+
* ## Fixes
|
|
9
|
+
* <span style='color:red'>fix "сохнарить"</span> ([a5fa42], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a5fa421c079792cf51f04ac696664731427620bf))
|
|
10
|
+
|
|
11
|
+
* update: CHANGELOG.md ([827275], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/8272753c3e16fa05b3e7cadb2880d4e0c8af4853))
|
|
12
|
+
|
|
1
13
|
# Version 2.6.3, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f79e922e4a2767df64ca69e459661b9e24e9098e)
|
|
2
14
|
* ## Fixes
|
|
3
15
|
* <span style='color:red'>fix uiElement/get request</span> ([edac67], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/edac674cb5d023de5ad274262db6d619de7d50fd))
|
package/package.json
CHANGED
|
@@ -4,14 +4,6 @@ Ext.define('Coon.common.component.Auth', {
|
|
|
4
4
|
systemPropertyName: 'VERSIONING_EMAIL_PERSONIFICATION_SW',
|
|
5
5
|
defaultDomain: '@sigma-it.ru',
|
|
6
6
|
privates: {
|
|
7
|
-
showError(e) {
|
|
8
|
-
Ext.create('Coon.report.component.ErrorWindow', {
|
|
9
|
-
autoShow: true,
|
|
10
|
-
title: 'Ошибка авторизации',
|
|
11
|
-
trace: e.message,
|
|
12
|
-
message: 'Во время авторизации произошла ошибка',
|
|
13
|
-
});
|
|
14
|
-
},
|
|
15
7
|
|
|
16
8
|
verify(data) {
|
|
17
9
|
return new Promise((resolve, reject) => {
|
|
@@ -39,25 +31,6 @@ Ext.define('Coon.common.component.Auth', {
|
|
|
39
31
|
});
|
|
40
32
|
},
|
|
41
33
|
|
|
42
|
-
isVerified(data) {
|
|
43
|
-
return (
|
|
44
|
-
data &&
|
|
45
|
-
Coon.util.generateHashFromObj(
|
|
46
|
-
Object.assign({}, data, {salt: 'auth'})
|
|
47
|
-
) === this.dataChecksum
|
|
48
|
-
);
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
markAsVerified(data) {
|
|
52
|
-
try {
|
|
53
|
-
this.dataChecksum = Coon.util.generateHashFromObj(
|
|
54
|
-
Object.assign({}, data, {salt: 'auth'})
|
|
55
|
-
);
|
|
56
|
-
} catch (e) {
|
|
57
|
-
Coon.log.error('Failed to mark auth data as verified', e);
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
|
|
61
34
|
parseJWT: (token) => {
|
|
62
35
|
try {
|
|
63
36
|
return JSON.parse(
|
|
@@ -99,6 +72,14 @@ Ext.define('Coon.common.component.Auth', {
|
|
|
99
72
|
});
|
|
100
73
|
},
|
|
101
74
|
},
|
|
75
|
+
showError(e) {
|
|
76
|
+
Ext.create('Coon.report.component.ErrorWindow', {
|
|
77
|
+
autoShow: true,
|
|
78
|
+
title: 'Ошибка авторизации',
|
|
79
|
+
trace: e.message,
|
|
80
|
+
message: 'Во время авторизации произошла ошибка',
|
|
81
|
+
});
|
|
82
|
+
},
|
|
102
83
|
|
|
103
84
|
handleAuthorization() {
|
|
104
85
|
return this.isValid().then((authorized) => authorized || this.request());
|
|
@@ -106,6 +87,7 @@ Ext.define('Coon.common.component.Auth', {
|
|
|
106
87
|
|
|
107
88
|
// Проверяет включена ли авторизация
|
|
108
89
|
isEnabled() {
|
|
90
|
+
return Promise.resolve(true);
|
|
109
91
|
return Coon.SystemProperties.fetch(
|
|
110
92
|
this.systemPropertyName,
|
|
111
93
|
'boolean'
|
|
@@ -116,20 +98,15 @@ Ext.define('Coon.common.component.Auth', {
|
|
|
116
98
|
return new Promise((resolve) => {
|
|
117
99
|
const data = this.getCachedData();
|
|
118
100
|
if (data) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
resolve(false);
|
|
129
|
-
});
|
|
130
|
-
} else {
|
|
131
|
-
resolve(true);
|
|
132
|
-
}
|
|
101
|
+
this.verify(data)
|
|
102
|
+
.then((isValid) => {
|
|
103
|
+
resolve(isValid);
|
|
104
|
+
})
|
|
105
|
+
.catch((e) => {
|
|
106
|
+
this.clearCache();
|
|
107
|
+
this.showError(e);
|
|
108
|
+
resolve(false);
|
|
109
|
+
});
|
|
133
110
|
} else {
|
|
134
111
|
resolve(false);
|
|
135
112
|
}
|
|
@@ -142,8 +119,10 @@ Ext.define('Coon.common.component.Auth', {
|
|
|
142
119
|
const wrap = Ext.widget('WindowWrap', {
|
|
143
120
|
title: 'Авторизация',
|
|
144
121
|
maximizable: false,
|
|
145
|
-
resizable:
|
|
122
|
+
resizable: true,
|
|
146
123
|
autoShow: true,
|
|
124
|
+
width: 520,
|
|
125
|
+
height: 280,
|
|
147
126
|
listeners: {
|
|
148
127
|
close: function() {
|
|
149
128
|
resolve(authorized);
|
|
@@ -24,8 +24,6 @@ Ext.define('Coon.security.GenerateTokenPanel', {
|
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
|
-
width: 520,
|
|
28
|
-
height: 240,
|
|
29
27
|
bodyPadding: 20,
|
|
30
28
|
items: [
|
|
31
29
|
{
|
|
@@ -102,8 +100,10 @@ Ext.define('Coon.security.GenerateTokenPanel', {
|
|
|
102
100
|
const email =
|
|
103
101
|
values.emailPrefix.replace(this.vm.get('defaultDomain'), '') +
|
|
104
102
|
this.vm.get('defaultDomain');
|
|
103
|
+
form.mask();
|
|
105
104
|
this.auth.generateToken(email, values.gitToken)
|
|
106
105
|
.then(function(properties) {
|
|
106
|
+
form && form.unmask();
|
|
107
107
|
if (!Ext.isObject(properties)) {
|
|
108
108
|
throw new Error('Не удалось сохранить токен');
|
|
109
109
|
}
|
|
@@ -117,6 +117,7 @@ Ext.define('Coon.security.GenerateTokenPanel', {
|
|
|
117
117
|
}
|
|
118
118
|
})
|
|
119
119
|
.catch((e) => {
|
|
120
|
+
form && form.unmask();
|
|
120
121
|
Coon.log.error(e.message);
|
|
121
122
|
this.vm.set('pending', false);
|
|
122
123
|
});
|
package/src/version.js
CHANGED