+
@@ -42,16 +47,20 @@ limitations under the License.
import InceptionConfigurer from './InceptionConfigurer';
import InceptionProgressMessagesMixin from './components/inception/InceptionProgressMessagesMixin';
import NewSoftwareVersionComponent from './components/header/NewSoftwareVersion';
+ import PkiAppBootstrap from '@//components/access/PkiAppBootstrap';
+ import DashboardFooter from './components/header/DashboardFooter';
export default {
name: 'App',
mixins: [InceptionProgressMessagesMixin],
components: {
+ DashboardFooter,
NewSoftwareVersionComponent,
CustomizableFooter,
CustomizableHeader,
HeaderView,
LoadingContainer,
+ PkiAppBootstrap,
},
data() {
return {
@@ -69,6 +78,9 @@ limitations under the License.
userInfo() {
return this.$store.getters.userInfo;
},
+ isPkiAndNeedsToBootstrap() {
+ return this.$store.getters.isPkiAuthenticated && this.$store.getters.config.needToBootstrap;
+ },
},
created() {
if (this.isAuthenticatedUser) {
@@ -76,6 +88,7 @@ limitations under the License.
this.isSupervisor = result;
this.addCustomIconCSS();
});
+ this.$store.dispatch('access/isRoot');
}
},
mounted() {
@@ -93,6 +106,7 @@ limitations under the License.
this.isSupervisor = result;
});
this.addCustomIconCSS();
+ this.$store.dispatch('access/isRoot');
}
},
userInfo(newUserInfo) {
@@ -109,10 +123,14 @@ limitations under the License.
};
-
diff --git a/frontend/src/components/access/AccessService.js b/dashboard/src/components/access/AccessService.js
similarity index 67%
rename from frontend/src/components/access/AccessService.js
rename to dashboard/src/components/access/AccessService.js
index 224a8cef..52a866c5 100644
--- a/frontend/src/components/access/AccessService.js
+++ b/dashboard/src/components/access/AccessService.js
@@ -19,11 +19,11 @@ export default {
getUserRoles(projectId, roleName) {
if (projectId) {
return axios.get(`/admin/projects/${projectId}/userRoles`)
- .then(response => response.data);
+ .then((response) => response.data);
}
if (roleName === 'ROLE_SUPER_DUPER_USER' || roleName === 'ROLE_SUPERVISOR') {
return axios.get(`/root/users/roles/${roleName}`)
- .then(response => response.data);
+ .then((response) => response.data);
}
throw new Error(`unexpected user role [${roleName}]`);
},
@@ -36,14 +36,14 @@ export default {
userId = userKey;
}
if (projectId) {
- return axios.put(`/admin/projects/${projectId}/users/${userKey}/roles/${roleName}`, null, { headers: { 'x-handleError': false } })
+ return axios.put(`/admin/projects/${projectId}/users/${userKey}/roles/${roleName}`, null, { handleError: false })
.then(() => axios.get(`/admin/projects/${projectId}/users/${userId}/roles`)
- .then(response => response.data.find(element => element.roleName === roleName)));
+ .then((response) => response.data.find((element) => element.roleName === roleName)));
}
if (roleName === 'ROLE_SUPER_DUPER_USER' || roleName === 'ROLE_SUPERVISOR') {
- return axios.put(`/root/users/${userKey}/roles/${roleName}`, null, { headers: { 'x-handleError': false } })
+ return axios.put(`/root/users/${userKey}/roles/${roleName}`, null, { handleError: false })
.then(() => axios.get(`/root/users/roles/${roleName}`)
- .then(response => response.data.find(element => element.userIdForDisplay.toLowerCase() === origUserId.toLowerCase())));
+ .then((response) => response.data.find((element) => element.userIdForDisplay.toLowerCase() === origUserId.toLowerCase())));
}
throw new Error(`unexpected user role [${roleName}]`);
},
@@ -52,13 +52,13 @@ export default {
return axios.delete(`/admin/projects/${projectId}/users/${userId}/roles/${encodeURIComponent(roleName)}`);
}
if (roleName === 'ROLE_SUPER_DUPER_USER' || roleName === 'ROLE_SUPERVISOR') {
- return axios.delete(`/root/users/${userId}/roles/${roleName}`).then(response => response.data);
+ return axios.delete(`/root/users/${userId}/roles/${roleName}`).then((response) => response.data);
}
throw new Error(`unexpected user role [${roleName}]`);
},
getOAuthProviders() {
return axios.get('/app/oAuthProviders')
- .then(response => response.data);
+ .then((response) => response.data);
},
resetClientSecret(projectId) {
return axios.put(`/admin/projects/${projectId}/resetClientSecret`)
@@ -66,12 +66,23 @@ export default {
},
getClientSecret(projectId) {
return axios.get(`/admin/projects/${projectId}/clientSecret`)
- .then(response => response.data);
+ .then((response) => response.data);
},
userWithEmailExists(email) {
- return axios.get(`/userExists/${email}`).then(response => !response.data);
+ return axios.get(`/userExists/${email}`).then((response) => !response.data);
},
hasRole(roleName) {
- return axios.get(`/app/userInfo/hasRole/${roleName}`).then(response => response.data);
+ return axios.get(`/app/userInfo/hasRole/${roleName}`).then((response) => response.data);
+ },
+ requestPasswordReset(userId) {
+ const formData = new FormData();
+ formData.append('userId', userId);
+ return axios.post('/resetPassword', formData, { handleError: false }).then((response) => response.data);
+ },
+ resetPassword(reset) {
+ return axios.post('/performPasswordReset', reset, { handleError: false }).then((response) => response.data);
+ },
+ isResetSupported() {
+ return axios.get('/public/isFeatureSupported?feature=passwordreset').then((response) => response.data);
},
};
diff --git a/frontend/src/components/access/AccessSettings.vue b/dashboard/src/components/access/AccessSettings.vue
similarity index 100%
rename from frontend/src/components/access/AccessSettings.vue
rename to dashboard/src/components/access/AccessSettings.vue
diff --git a/dashboard/src/components/access/BootstrapService.js b/dashboard/src/components/access/BootstrapService.js
new file mode 100644
index 00000000..9ff9326a
--- /dev/null
+++ b/dashboard/src/components/access/BootstrapService.js
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2020 SkillTree
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import axios from 'axios';
+
+export default {
+ grantRoot() {
+ return axios.post('/grantFirstRoot').then((response) => response.data);
+ },
+};
diff --git a/dashboard/src/components/access/Login.vue b/dashboard/src/components/access/Login.vue
new file mode 100644
index 00000000..623ebec7
--- /dev/null
+++ b/dashboard/src/components/access/Login.vue
@@ -0,0 +1,218 @@
+/*
+Copyright 2020 SkillTree
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+
+
+
+
+
diff --git a/dashboard/src/components/access/PkiAppBootstrap.vue b/dashboard/src/components/access/PkiAppBootstrap.vue
new file mode 100644
index 00000000..9f44e243
--- /dev/null
+++ b/dashboard/src/components/access/PkiAppBootstrap.vue
@@ -0,0 +1,69 @@
+/*
+Copyright 2020 SkillTree
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+
+
+
+
+
SkillTree Dashboard
+
+
+
+
+
+
+
Getting Things Ready!
+ This may take just a second...
+
+
+
The root account has been successfully
+ created!
+
Inception self-training project
+ created!
+
+
Please proceed to the SkillTree Dashboard.
+
Let's Get Started!
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dashboard/src/components/access/RequestAccess.vue b/dashboard/src/components/access/RequestAccess.vue
new file mode 100644
index 00000000..56bd22b8
--- /dev/null
+++ b/dashboard/src/components/access/RequestAccess.vue
@@ -0,0 +1,184 @@
+/*
+Copyright 2020 SkillTree
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+
+
+
+
+
+ New Root Account
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dashboard/src/components/access/RequestPasswordReset.vue b/dashboard/src/components/access/RequestPasswordReset.vue
new file mode 100644
index 00000000..02da7341
--- /dev/null
+++ b/dashboard/src/components/access/RequestPasswordReset.vue
@@ -0,0 +1,144 @@
+/*
+Copyright 2020 SkillTree
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+
+
+
+
+
Reset Password For SkillTree Dashboard
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dashboard/src/components/access/RequestResetConfirmation.vue b/dashboard/src/components/access/RequestResetConfirmation.vue
new file mode 100644
index 00000000..04f8dd21
--- /dev/null
+++ b/dashboard/src/components/access/RequestResetConfirmation.vue
@@ -0,0 +1,65 @@
+/*
+Copyright 2020 SkillTree
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+
+
+
+
+
Password Reset Sent!
+
+
+
+ A password reset link has been sent to {{ email }}. You will be forwarded to the login page in {{ timer }} seconds.
+
+
+
+
+
+
+
+
+
diff --git a/dashboard/src/components/access/ResetConfirmation.vue b/dashboard/src/components/access/ResetConfirmation.vue
new file mode 100644
index 00000000..4d3ae119
--- /dev/null
+++ b/dashboard/src/components/access/ResetConfirmation.vue
@@ -0,0 +1,65 @@
+/*
+Copyright 2020 SkillTree
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+
+
+
+
+
Password Successfully Reset!
+
+
+
+ Your password has been successfully reset! You will be forwarded to the login page in {{ timer }} seconds.
+
+
+
+
+
+
+
+
+
diff --git a/dashboard/src/components/access/ResetNotSupportedPage.vue b/dashboard/src/components/access/ResetNotSupportedPage.vue
new file mode 100644
index 00000000..631090fb
--- /dev/null
+++ b/dashboard/src/components/access/ResetNotSupportedPage.vue
@@ -0,0 +1,42 @@
+/*
+Copyright 2020 SkillTree
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+
+
+
+
+
Password Reset not currently enabled
+
+
+
+ Password Reset is not currently enabled on this system. Please contact your SkillTree administrator. Return to the login page?
+
+
+
+
+
+
+
+
diff --git a/dashboard/src/components/access/ResetPassword.vue b/dashboard/src/components/access/ResetPassword.vue
new file mode 100644
index 00000000..d2acebba
--- /dev/null
+++ b/dashboard/src/components/access/ResetPassword.vue
@@ -0,0 +1,148 @@
+/*
+Copyright 2020 SkillTree
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+
+
+
+
+
+ Reset Account Password
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/components/access/RoleManager.vue b/dashboard/src/components/access/RoleManager.vue
similarity index 93%
rename from frontend/src/components/access/RoleManager.vue
rename to dashboard/src/components/access/RoleManager.vue
index e5718b4f..afb7b5b7 100644
--- a/frontend/src/components/access/RoleManager.vue
+++ b/dashboard/src/components/access/RoleManager.vue
@@ -21,14 +21,15 @@ limitations under the License.
v-model="selectedUser"/>