Skip to content
Snippets Groups Projects
Commit 04e73511 authored by Ron Lucke's avatar Ron Lucke Committed by Elmar Ludwig
Browse files

fix #786

parent c0f4ad86
No related branches found
No related tags found
No related merge requests found
......@@ -1008,6 +1008,13 @@ export const actions = {
},
loadTeacherStatus({ dispatch, rootGetters, state, commit, getters }, userId) {
const user = rootGetters['users/byId']({ id: userId });
if (user.attributes.permission === 'root') {
commit('setUserIsTeacher', true);
return;
}
const membershipId = `${state.context.id}_${userId}`;
return dispatch('course-memberships/loadById', { id: membershipId })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment