diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/api/routes/auth/loginPOST.js | 5 | ||||
| -rw-r--r-- | src/site/components/sidebar/Sidebar.vue | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/api/routes/auth/loginPOST.js b/src/api/routes/auth/loginPOST.js index 38bbc49..205737a 100644 --- a/src/api/routes/auth/loginPOST.js +++ b/src/api/routes/auth/loginPOST.js @@ -20,6 +20,11 @@ class loginPOST extends Route { if (!user) return res.status(401).json({ message: 'Invalid authorization' }); /* + Checks if the user is disabled + */ + if (!user.enabled) return res.status(401).json({ message: 'This account has been disabled' }); + + /* Checks if the password is right */ const comparePassword = await bcrypt.compare(password, user.password); diff --git a/src/site/components/sidebar/Sidebar.vue b/src/site/components/sidebar/Sidebar.vue index cf3fc4b..40213b5 100644 --- a/src/site/components/sidebar/Sidebar.vue +++ b/src/site/components/sidebar/Sidebar.vue @@ -49,9 +49,12 @@ <router-link to="/dashboard/users"> <i class="icon-setting-gear-a" />Users </router-link> + <!-- + TODO: Dont wanna deal with this now <router-link to="/dashboard/settings"> <i class="icon-setting-gear-a" />Settings </router-link> + --> </template> </div> </template> |