1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

Fix a bug: minor pb when bot hit api/projects#search without beeing authenticated

This commit is contained in:
Nicolas Florentin 2023-09-29 14:31:23 +02:00
parent 01ac407ee3
commit 64620a2759
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
# Changelog Fab-manager
## next release
- Fix a bug: minor pb when bot hit api/projects#search without beeing authenticated
## v6.1.1 2023 September 28
- Fix a bug: unable to sync projects with openprojects

View File

@ -71,7 +71,7 @@ class API::ProjectsController < API::APIController
render :index
end
format.zip do
head :forbidden unless current_user.admin? || current_user.manager?
head :forbidden unless current_user && (current_user.admin? || current_user.manager?)
send_data ProjectsArchive.new(res[:projects]).call, filename: "projets.zip", disposition: 'attachment', type: 'application/zip'
end