check roles
This commit is contained in:
parent
1adbca1582
commit
761dea73aa
|
@ -13,12 +13,20 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
import {ROLE_TEST_MANAGER, ROLE_TEST_USER, ROLE_TEST_VIEWER} from "../../../common/constants";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsRecentProject",
|
name: "MsRecentProject",
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$get('/project/recent/5', (response) => {
|
const rolesString = localStorage.getItem("roles");
|
||||||
this.recentProjects = response.data;
|
const roles = rolesString.split(',');
|
||||||
});
|
|
||||||
|
if (roles.indexOf(ROLE_TEST_MANAGER) > -1 || roles.indexOf(ROLE_TEST_USER) > -1 || roles.indexOf(ROLE_TEST_VIEWER) > -1) {
|
||||||
|
this.$get('/project/recent/5', (response) => {
|
||||||
|
this.recentProjects = response.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {},
|
methods: {},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
@ -11,12 +11,20 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {ROLE_TEST_MANAGER, ROLE_TEST_USER, ROLE_TEST_VIEWER} from "../../../common/constants";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsRecentTestPlan",
|
name: "MsRecentTestPlan",
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$get('/testplan/recent/5', (response) => {
|
const rolesString = localStorage.getItem("roles");
|
||||||
this.recentTestPlans = response.data;
|
const roles = rolesString.split(',');
|
||||||
});
|
|
||||||
|
if (roles.indexOf(ROLE_TEST_MANAGER) > -1 || roles.indexOf(ROLE_TEST_USER) > -1 || roles.indexOf(ROLE_TEST_VIEWER) > -1) {
|
||||||
|
this.$get('/testplan/recent/5', (response) => {
|
||||||
|
this.recentTestPlans = response.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue