Skip to content
Snippets Groups Projects
Commit e13cb767 authored by michael.minelli's avatar michael.minelli
Browse files

AssignmentPublish => Fix wrong test of staff

parent 58db4cb4
No related branches found
No related tags found
No related merge requests found
Pipeline #26634 passed
...@@ -59,9 +59,10 @@ abstract class AssignmentPublishUnpublishCommandBase extends CommanderCommand { ...@@ -59,9 +59,10 @@ abstract class AssignmentPublishUnpublishCommandBase extends CommanderCommand {
const assignmentCheckAccessSpinner: ora.Ora = ora({ const assignmentCheckAccessSpinner: ora.Ora = ora({
text: 'Checking accesses', indent: 8 text : 'Checking accesses',
indent: 8
}).start(); }).start();
if ( !assignment.staff ) { if ( !assignment.staff.some(staff => staff.gitlabId === SessionManager.profile?.gitlabId) ) {
assignmentCheckAccessSpinner.fail(`You are not in the staff of this assignment`); assignmentCheckAccessSpinner.fail(`You are not in the staff of this assignment`);
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment