summaryrefslogtreecommitdiff
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
* Implement search of code via git grepsearch-git-grepDmitriy Zaporozhets2015-07-101-0/+34
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge branch 'rs-dev-issue-2372' into 'master'Dmitriy Zaporozhets2015-07-081-0/+4
|\ | | | | | | | | | | | | | | Filter by issues/merge requests without a milestone Closes internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2372 See merge request !886
| * Rename NoMilestone to Milestone::NoneRobert Speicher2015-07-062-13/+4
| | | | | | | | Also refactors IssuableFinder to avoid redundant title check.
| * Allow user to filter by Issues/Merge Requests without a MilestoneRobert Speicher2015-07-061-0/+13
| |
* | Change "Irc Uri" -> "IRC URI"Stan Hu2015-07-071-1/+1
|/
* Merge branch 'audit_log' into 'master'Dmitriy Zaporozhets2015-07-062-0/+21
|\ | | | | | | | | | | | | | | Audit log for user authentication https://dev.gitlab.org/gitlab/gitlabhq/issues/2318 See merge request !931
| * Audit log for user authenticationValery Sizov2015-07-062-0/+21
| |
* | Merge branch 'add-irker-options' into 'master'Dmitriy Zaporozhets2015-07-061-64/+45
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 * Closes gitlab-com/support-forum#139 ### Screenshots ### Before ![image](https://gitlab.com/stanhu/gitlab-ce/uploads/2eb3eb815e249e9fb669fc97ecd4f3c8/image.png) ### After ![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/cceaba951c05bd3df2c842cc68046b87/image.png) See merge request !930
| * | Add Irker service configuration optionsStan Hu2015-07-051-64/+45
| |/ | | | | | | | | | | Closes #1713 Closes #1714 Closes gitlab-com/support-forum#139
* | 'created_at DESC' is performed twicecatatsuy2015-07-021-1/+1
|/ | | | | | | | If you are already sorting in descending order in the created_at, it is run twice when you run the .recent. It has passed in the string 'created_at DESC'. Ruby on Rails is directly given to the SQL. It is a slow query in MySQL.
* Refactor can_be_merged logic for merge requestDmitriy Zaporozhets2015-07-012-7/+10
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge branch 'use-rugged-for-merge' into 'master'Dmitriy Zaporozhets2015-07-012-3/+16
|\ | | | | | | | | | | | | | | | | | | Merge branches inside one repository using rugged instead of satellites Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> cc @rspeicher @DouweM See merge request !918
| * Merge branches inside one repository using rugged instead of satellitesDmitriy Zaporozhets2015-07-012-3/+16
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | fix of GitLab CI forkingValery Sizov2015-07-011-0/+1
|/
* Merge branch 'fix-zero-sha-lookup' into 'master'Dmitriy Zaporozhets2015-07-011-2/+4
|\ | | | | | | | | | | | | | | Repository#blob_at should return nil for 00000000... sha Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> See merge request !916
| * Repository#blob_at should return nil for 00000000... shafix-zero-sha-lookupDmitriy Zaporozhets2015-07-011-2/+4
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Reporter role can manage issue tracker nowreporter-manage-issuesDmitriy Zaporozhets2015-06-301-4/+4
|/ | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Refactor issue, mr, note abilities to include project abilities tooDmitriy Zaporozhets2015-06-261-13/+30
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Change dynamic abilities to new formatDmitriy Zaporozhets2015-06-261-11/+7
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Rename abilities to correspond contoller/model action namesrename-abilitiesDmitriy Zaporozhets2015-06-261-13/+13
| | | | | | | | | | | | | | | | | 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>
* Simplify set of assignee, milestone and label to admin_issue ruleDmitriy Zaporozhets2015-06-261-4/+0
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Dont allow guest to set assigne, milestone and label when create new issue ↵Dmitriy Zaporozhets2015-06-251-0/+3
| | | | | | or merge request Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge branch 'performance-improvements' into 'master'Dmitriy Zaporozhets2015-06-251-3/+5
|\ | | | | | | | | | | | | | | | | | | | | 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
| * Improve performance for issue#show pageDmitriy Zaporozhets2015-06-241-3/+5
| | | | | | | | | | | | | | | | | | * 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>
* | Merge branch 'rs-issue-1850' into 'master'Douwe Maan2015-06-242-10/+6
|\ \ | |/ |/| | | | | | | | | | | | | | | | | Only look up Commit authors/committers by email - Removes looking up authors/committers by name - Renames `User.find_for_commit` to `User.find_by_any_email` Closes #1850 See merge request !878
| * Only look up Commit authors/committers by emailrs-issue-1850Robert Speicher2015-06-232-10/+6
| | | | | | | | | | - Removes looking up authors/committers by name - Renames `User.find_for_commit` to `User.find_by_any_email`
* | Allow user to remove public email addressrs-dev-issue-2419Robert Speicher2015-06-231-1/+3
|/
* Validate presence of provider field in Identityidentity-validationDmitriy Zaporozhets2015-06-231-0/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge branch 'rs-dev-issue-2414' into 'master'Dmitriy Zaporozhets2015-06-231-18/+16
|\ | | | | | | | | | | | | | | | | | | Allow Admin to filter users by 2FA status > ![Screen_Shot_2015-06-19_at_4.38.12_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/deba7f2a6b8d1548c1d1ac401e0e35a1/Screen_Shot_2015-06-19_at_4.38.12_PM.png) Closes internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2414 See merge request !852
| * Use alias_attribute to define User#two_factor_enabledrs-dev-issue-2414Robert Speicher2015-06-221-14/+3
| |
| * Make default value for otp_required_for_login false instead of nullRobert Speicher2015-06-201-4/+4
| |
| * Allow Admin to filter users by 2FA statusRobert Speicher2015-06-191-4/+13
| |
* | Merge branch 'revert-mr-state-names'Dmitriy Zaporozhets2015-06-222-6/+14
|\ \ | | | | | | | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: features/steps/project/merge_requests.rb
| * | Revert merge request states renamingDmitriy Zaporozhets2015-06-192-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | Replaced: * "Accepted" with "Merged" * "Rejected" with "Closed" Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | Replace remaining references to `Note.create_cross_reference_note`Robert Speicher2015-06-222-6/+1
| | |
* | | Merge branch 'web-editor-autocrlf' into 'master'Dmitriy Zaporozhets2015-06-221-1/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert CRLF newlines to LF when committing using the web editor. Fixes #1823 and https://github.com/gitlabhq/gitlabhq/issues/7950. Depends on https://gitlab.com/gitlab-org/gitlab_git/merge_requests/29 being merged and a new gitlab_git being released. cc @jacobvosmaer See merge request !858
| * | | Convert CRLF newlines to LF when committing using the web editor.web-editor-autocrlfDouwe Maan2015-06-201-1/+6
| | | |
* | | | Merge branch 'rs-dev-issue-2355' into 'master'Dmitriy Zaporozhets2015-06-221-4/+20
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | Spec and refactor User.find_for_commitRobert Speicher2015-06-171-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | Now it executes a single query instead of a possible three at the cost of some scary-looking ARel calls.
* | | | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceDmitriy Zaporozhets2015-06-222-5/+16
|\ \ \ \ \ | | |/ / / | |/| | |
| * | | | Merge branch 'fix-error-500-internal-snippet' into 'master'Douwe Maan2015-06-201-1/+1
| |\ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Error 500 when one user attempts to access another's personal, internal snippet ### What does this MR do? This MR fixes an Error 500 that occurred if one user tried to access another's personal, internal snippet. Steps to reproduce: ### Why was this MR needed? 1. Go to `<hostname>/snippets/new`. 2. Select "Internal". 3. Create a snippet. Save the URL (e.g. `<hostname>/snippets/20`) 4. Logout and sign in as another user. 5. Go to the URL in step 3. ### What are the relevant issue numbers? Closes #1815 See merge request !854
| | * | | Fix Error 500 when one user attempts to access a personal, internal snippetStan Hu2015-06-191-1/+1
| | | |/ | | |/| | | | | | | | | Closes #1815
| * | | Add convenience methods to User for getting and setting 2FA statusRobert Speicher2015-06-191-0/+12
| | | |
| * | | Move the User dashboard enum further up in the classRobert Speicher2015-06-191-4/+3
| |/ /
* | | Merge branch 'snippet_optional_filename' into 'master'Douwe Maan2015-06-201-1/+0
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | Make snippet filename optional. Fixes #2384. See merge request !1866
| * | Make snippet filename optional.Nicolas2015-06-201-1/+0
| | | | | | | | | | | | Fixes #2384.
* | | Merge branch 'fix-labels-permisssion-check' into 'master'Douwe Maan2015-06-181-0/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | 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 9bcd36396b9 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
| * | Fix 403 Access Denied error messages when accessing Labels section in a ↵Stan Hu2015-06-181-0/+1
| | | | | | | | | | | | | | | | | | project that has MRs disabled but issues enabled Closes #1813
* | | Fix duplicate 'Email has already been taken' message when creating a user, ↵swellard2015-06-161-1/+1
| | | | | | | | | | | | updated comments
* | | Fix duplicate 'Email has already been taken' message when creating a userswellard2015-06-161-1/+3
|/ /