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

Sonar => Resolve issues

parent 28d6b09f
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ class SecurityMiddleware {
return req.session.sendResponse(res, StatusCodes.UNAUTHORIZED);
}
const isAllowed: boolean = checkTypes.length === 0 ? true : checkTypes.find(async (checkType) => this.checkType(checkType, req)) !== undefined;
const isAllowed: boolean = checkTypes.length === 0 ? true : checkTypes.find(async checkType => this.checkType(checkType, req)) !== undefined;
if ( !isAllowed ) {
return req.session.sendResponse(res, StatusCodes.FORBIDDEN);
......
......@@ -219,7 +219,7 @@ class AssignmentRoutes implements RoutesManager {
const lastCommit = await GitlabManager.getRepositoryLastCommit(req.boundParams.exercise!.gitlabId);
if ( lastCommit ) {
if ( !isUpdate ) {
await GitlabManager.changeRepositoryVisibility(req.boundParams.exercise!.gitlabId, GitlabVisibility.INTERNAL);
await GitlabManager.changeRepositoryVisibility(req.boundParams.exercise!.gitlabId, 'internal');
}
await db.exercise.update({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment