LDAP Sync blocked user edgecases
Allow GitLab admins to block otherwise valid GitLab LDAP users
(https://gitlab.com/gitlab-org/gitlab-ce/issues/3462)
Based on the discussion on the original issue, we are going to differentiate "normal" block operations to the ldap automatic ones in order to make some decisions when its one or the other.
Expected behavior:
- [x] "ldap_blocked" users respond to both `blocked?` and `ldap_blocked?`
- [x] "ldap_blocked" users can't be unblocked by the Admin UI
- [x] "ldap_blocked" users can't be unblocked by the API
- [x] Block operations that are originated from LDAP synchronization will flag user as "ldap_blocked"
- [x] Only "ldap_blocked" users will be automatically unblocked by LDAP synchronization
- [x] When LDAP identity is removed, we should convert `ldap_blocked` into `blocked`
Mockup for the Admin UI with both "ldap_blocked" and normal "blocked" users:

There will be another MR for the EE version.
See merge request !2242
Attempting to use the /projects/:id API by specifying :id in
"namespace/project" format would always result in a 404 if the namespace
contained a dot.
The reason? From http://guides.rubyonrails.org/routing.html#specifying-constraints:
"By default the :id parameter doesn't accept dots - this is because the dot is
used as a separator for formatted routes. If you need to use a dot within an
:id add a constraint which overrides this - for example id: /[^\/]+/ allows
anything except a slash."
Closes https://github.com/gitlabhq/gitlabhq/issues/9573
Automatically fork a project when not allowed to edit a file.
Fixes#3215.
To do:
- [ ] Add tests
-----
## "Edit" button on file in a project the user does NOT have write access to

## Clicking will automatically create a fork

## When the fork has been created, the user is returned to the edit page on the original project with a notice

## The user cannot change the target branch and is informed that editing will start an MR

## Hitting "Commit changes" will commit and start an MR from my fork to the origin project

-----
## "Create file, "Upload file" and "New directory" buttons in a project the user does NOT have write access to

## Clicking any of these options will automatically create a fork

## When the fork has been created, the user is returned to the tree page on the original project with a notice

## Clicking "New directory" again will show the modal. The user cannot change the target branch and is informed that editing will start an MR

## Hitting "Create directory" will commit and start an MR from my fork to the origin project

cc @dzaporozhets @skyruler
See merge request !2145
Api support for requesting starred projects for user
Closes#4112
Note: probably targets the wrong release in the `CHANGELOG`, though 8.4 was not there yet
See merge request !2127
* add note to Events API
* add author section to Events API
* add noteable_id and noteable_type to Notes API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Add upvote/downvote fields to merge request and note API to preserve compatibility
As discussed in !1825 we should not break the API compatibility.
* This MR adds the fields `upvotes`/`downvotes` to the merge request API again, which always return `0`.
* Add the fields `upvote`/`downvote` to the notes API, which always return `false`
This behavior is documented in the API docs.
See merge request !1867