Only enable HSTS header for HTTPS and port 443
### What does this MR do?
This MR adds a check that the port used is 443, in addition to HTTPS being enabled, when activating the HSTS header.
### Why was this MR needed?
If a user is using a non-standard port for SSL, enabling this header would send clients to port 443 when that port is invalid.
### What are the relevant issue numbers?
Closes https://github.com/gitlabhq/gitlabhq/issues/9449
See merge request !966
Add ref switching support for graphs
It is now possible to view contributor and commit statistics for
refs beyond the default branch. While the Git ref already was part of
the path it has not been used before.
Additionally, the code in RefsController#switch has been slighliy
refactored since it would have become confusing with additional if-else
branches added.
See merge request !932
It is now possible to view contributor and commit statistics for
refs beyond the default branch.
Additionally, conditions in RefsController#switch have been refactored
in order that a `case` block is used now.
Add Irker service configuration options
### What does this MR do?
This MR makes a number of hard-coded Irker parameters configurable in the service settings: Irker server host, port, and default IRC URI. It also removes the "max recipient" limit since the recipient list is configurable only by the project owner, and it makes no sense to update the limit when it is implied in the recipient list already.
### Why was this MR needed?
The existing service assumed that gitlab.com was running an Irker daemon on `localhost` when it was not. Using Irker on gitlab.com thus did not work at all. This MR allows users to provide their own Irker daemons.
### Are there points in the code the reviewer needs to double check?
My main concern is whether allowing a user to specify the server/port combination would have security implications for a host. Given that HipChat and Slack allow users to do this, I didn't think this was doing anything novel.
### What are the relevant issue numbers?
* Closes#1713
* Closes#1714
* Closesgitlab-com/support-forum#139
### Screenshots
### Before

### After

See merge request !930
Redirection to the home page URL was broken by changing the target for
`root_url` from `DashboardController` to `RootController` in
94d3c1433d. This regression was introduced
in the 7.12.0 release.
Fixes#1916.
write_ was renamed to create_
modify_ was renamed to update_
So now in update action we have next code
def create
can?(current_user, :create_issue, @issue)
end
def update
can?(current_user, :update_issue, @issue)
end
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* store @participants in variable
* store result of subscribed? call into variable
In total it reduce amount of SQL queries for merge_request with 10
comments/participants twice.
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* store @participants in variable
* store result of subscribed? call into variable
In total it reduce amount of SQL queries for issue with 10 comments/participants twice.
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
projects doesn't seem to be a valid action in this controller
Hi,
This is just a tiny change. Let me know if I'm doing it wrong...
Eaden
See merge request !696
MergeRequest#show performance improvements
This is a first pass on improving the performance of the `MergeRequests#show` page. Notable changes:
- The "Commits" tab is loaded lazily, so the initial page load should be much faster for MRs with many commits.
- Relative timestamps via `timeago` are only initialized once per load instead of `O(n^2)`. This greatly improves frontend rendering times for a large number of commits.
- Refactored `User.find_for_commit` to use a single ARel-generated SQL query instead of the old method which resulted in one query, and could result in up to three.
See merge request !838
Fix 403 Access Denied error messages when accessing Labels section in a project
This would occur if the project's issues or merge requests features were disabled. The change in 9bcd36396b caused `can?(current_user, :read_merge_request, project)` to be false if the merge request feature were disabled, so `authorize_labels!` needs to be changed accordingly.
Closes#1813
See merge request !836