Skip to content
Snippets Groups Projects
Commit 0b4ae6da authored by Kurniandha Sukma Yunastrian's avatar Kurniandha Sukma Yunastrian Committed by Dimas Aditia Pratikto
Browse files

Change default student email mahasiswa, else lecturer

parent 1f11be8e
1 merge request!39#55 CAS Authentication Integration
......@@ -152,10 +152,10 @@ export default {
this.username = email.split("@", 1)[0];
if (localStorage.urole === "DEFAULT_USER") {
if (localStorage.uemail.includes("lecturer")) {
this.role = "lecturer";
} else if (localStorage.uemail.includes("student")) {
if (localStorage.uemail.includes("mahasiswa")) {
this.role = "student";
} else {
this.role = "lecturer";
}
} else {
this.role = "admin";
......
function checkRole(email) {
if (email.includes("mahasiswa")) {
return "student";
} else {
return "lecturer";
}
}
module.exports = {
checkRole
};
......@@ -45,6 +45,12 @@
transition: transform 1.2s ease-in-out, -webkit-transform 1.2s ease-in-out;
}
.cas {
margin: 0;
position: absolute;
top: 20%;
}
label {
span {
font-size: 14px;
......
......@@ -2,7 +2,7 @@
<div class="container-login d-flex flex-column">
<div class="cont">
<!-- SIGN IN -->
<div class="form sign-in align-middle">
<div class="form cas sign-in">
<!-- Logo ITB -->
<div class="text-center">
<img
......@@ -27,15 +27,20 @@
<div class="img">
<div class="img-text m-up">
<h2 class="my-5">INSTITUT TEKNOLOGI BANDUNG</h2>
<h2 class="pt-3 pb-3">
Sistem Informasi<br />
<h2 class="pt-2 pb-4">
SIX <br />
Sistem Informasi <br />
Akademix
</h2>
<p class="text-white">
Mari tetap semangat <br />
belajar demi masa<br />
depan yang luar biasa!
belajar bersama di <br />
kampus tercinta demi <br />
masa depan luar biasa!
</p>
<h2 class="pt-3 pb-3">
In Harmonia Progressio
</h2>
</div>
</div>
</div>
......@@ -45,6 +50,7 @@
<script>
import axios from "axios";
import { checkRole } from "../../store/authenticationRoleChecker";
export default {
name: "Authentication",
......@@ -106,10 +112,11 @@ export default {
});
},
register() {
const role = checkRole(this.credential.email);
const applicant = {
email: this.credential.email,
password: "12345678",
role: "student"
role: role
};
axios
.post(process.env.VUE_APP_API_ENDPOINT + "/auth/register", applicant)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment