Rename abilities to correspond contoller/model action names
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
```
See merge request !896
Reorder MergeRequestTabs constructor
The tab was being activated before we set the `[commits|diffs]Loaded`
variable, so even when the `/diffs` route is accessed directly, like
from the "Side-by-side" link, the tab was being loaded from its default
source.
Fixes#1887
See merge request !892
Update permissions for issue tracker management
Don't allow guest or reporter to set assignee, milestone and label when create or update new issue and merge request.
After this change `Guest` and `Reporter` rule is used to report issues but only `Developer` and higher roles can manage issues (schedule milestone, assign to user or close any issue)
Also I removed some duplication code between issues and merge requests and put all issuable partials in one directory
See merge request !890
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>
Add SAML to list of social_provider
Resolves issue 1888. Still an issue because the SAML link under Connected Accounts will not have a logo.
See merge request !891
The tab was being activated before we set the `[commits|diffs]Loaded`
variable, so even when the `/diffs` route is accessed directly, like
from the "Side-by-side" link, the tab was being loaded from its default
source.
Fixes#1887
Have sidebar labels disappear behind content instead of hide immediately when collapsing.
I'm not sure how to make a gif out of it, but I promise it looks pretty :)
See merge request !888
Performance improvements
* store @participants in variable
* store result of subscribed? call into variable
In total it reduce amount of SQL queries for issue or merge_request with 10 comments/participants almost twice.
See merge request !883
Add 2FA status to user admin API
This MR adds the `two_factor_enabled` field to the admin's API to indicate whether a given user has enabled 2FA.
See merge request !881
Updated merge request merged web hook to correctly fire action=merged.
I believe this merge request will fix both issues #879 and #498.
If a merge request was merged via the command line, the correct web hook was fired with the field `object_attributes.action = "merge"`. However, if the merge request was merged via the web UI, the webhook would be fired with `object_attributes.action = "open"`.
See merge request !780