Are you accessing the "Labels" button on the sidebar and getting the 403? Or are you accessing the page some other way?
I just created a new private project on gitlab.com and had no issues going to the be Labels button or creating a new label. If you create a new project, does the same issue happen?
@stanhu I use the link "Labels" in the sidebar and I get an error 403 on private and internal projects already created. Indeed, I have no problem with a new project.
@thelinuxfr Thanks, that is really quite odd. It looks like a regression indeed. If this were a permission issue, I would expect to see a 404 error, but instead we see the 403 Access Denied page. My guess is that there is some error, and the catch-all is just showing that page.
@jacobvosmaer, could you check the server logs to see what is going on here?
HMM when I load https://gitlab.com/thelinuxfr/start.lietart.fr/labels as an admin and look in the Chrome web inspector, the HTTP response code is 404, even though the page says 403. @thelinuxfr do you get HTTP code 404 too?
production.log: Started GET "/thelinuxfr/start.lietart.fr/labels" for 24.132.139.90 at 2015-06-17 12:15:22 +0000production.log: Processing by Projects::LabelsController#index as HTMLproduction.log: Parameters: {"namespace_id"=>"thelinuxfr", "project_id"=>"start.lietart.fr"}production.log: Filter chain halted as :authorize_labels! rendered or redirectedproduction.log: Completed 404 Not Found in 128ms (Views: 36.3ms | ActiveRecord: 10.1ms)
Also interesting to note: if I enable the merge requests feature on the project, the labels page works fine. I suspect this may be a regression from 9bcd3639, but I can't explain why yet.
Oh, I see the problem in application_controller.rb:
defauthorize_project!(action)returnaccess_denied!unlesscan?(current_user,action,project)enddefauthorize_labels!# Labels should be accessible for issues and/or merge requestsauthorize_read_issue!||authorize_read_merge_request!end
If merge requests are disabled, the user does not have access to read them, and this code will return Access Denied. Do we need to check if the features are enabled here?
It has issues enabled, but MRs disabled. The permissions check was refactored so that can?(current_user, :read_merge_request, project) will fail if merge requests are disabled.