Commit b7d0b1c8 authored by GuiΩ's avatar GuiΩ
Browse files

fix(questionEdit): only 'validators' can edit a question

parent 48f85d0a
......@@ -147,7 +147,8 @@ Events:
function onDblClick(event: MouseEvent, questionId: QuestionID) {
emit('question-edit', {questionId:questionId, action:'edit'})
if (permissions.includes('Validateur'))
emit('question-edit', {questionId:questionId, action:'edit'})
clearTimeout(clickTimer);
nClick = 0
}
......@@ -155,8 +156,11 @@ Events:
function onContextMenu(event: MouseEvent, questionId: QuestionID) {
emit('show-context-menu', {
event: event, options: [
{name: 'Éditer', callback: () => emit('question-edit', {questionId:questionId, action:'edit'})},
{name: 'Dupliquer', callback: () => emit('question-edit', {questionId:questionId, action:'duplicate'})},
{ name: 'Éditer',
hidden: ! permissions.includes('Validateur'),
callback: () => emit('question-edit', {questionId:questionId, action:'edit'})},
{ name: 'Dupliquer',
callback: () => emit('question-edit', {questionId:questionId, action:'duplicate'})},
{ name: 'Propriétés',
callback: (event: MouseEvent) => emit('show-question-tooltip',{event: event, questionId: questionId})},
{name: 'Annuler'}
......
Supports Markdown
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