summaryrefslogtreecommitdiff
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'make-namespaces-api-available-to-all-users' into 'master'Dmitriy Zaporozhets2015-06-041-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make namespace API available to all users ### What does this MR do? This MR makes it possible for a user to query namespaces to which he/she has access. Also, it adds documentation for the existing API. ### Why was this MR needed? Even though the `groups` API exists, it might still be useful to have an endpoint that tells the namespace type (e.g. `user` vs. `group`), especially if a user has access to a number of different projects. ### What are the relevant issue numbers? Closes https://github.com/gitlabhq/gitlabhq/issues/9328 See merge request !708
| * Make namespace API available to all usersStan Hu2015-05-281-0/+6
| | | | | | | | Closes https://github.com/gitlabhq/gitlabhq/issues/9328
* | Skip repo removing whem remove user or groupDmitriy Zaporozhets2015-06-031-4/+8
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Log group creation and removalDmitriy Zaporozhets2015-06-031-0/+4
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Remove projects before group/user. Remove namespace directory asyncfix-group-removeDmitriy Zaporozhets2015-06-031-2/+9
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | GitLab CI service sends gitlab-ci.yml fileci_yml_fileValery Sizov2015-06-021-0/+14
| |
* | Remove files in web editor using ruggedDmitriy Zaporozhets2015-06-021-8/+30
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Create and edit files in web editor via ruggedDmitriy Zaporozhets2015-06-011-0/+25
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Allow to configure a URL to show after sign outAlex Lossent2015-05-291-0/+5
| |
* | Merge branch 'support-edit-target-branch-in-mr' into 'master'Dmitriy Zaporozhets2015-05-291-1/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support editing target branch of merge request ### What does this MR do? This MR makes it possible to edit the target branch of a merge request and adds a system note when this happens. ### Why was this MR needed? Because lots of people requested this feature. :) ### Screenshots **Edit MR page** ![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/9b3d405bf7b5f945e35bae3534c2b67b/image.png) **New MR page** ![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/3657a2a9efad6d10e8470637d1166bdb/image.png) **System note** ![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/cc8066f3d3bdf09c0cce27193210567d/image.png) ### What are the relevant issue numbers? * Closes https://github.com/gitlabhq/gitlabhq/issues/7105 * See: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/130! See merge request !738
| * | Support editing target branch of merge requestStan Hu2015-05-291-1/+0
| |/ | | | | | | | | Closes https://github.com/gitlabhq/gitlabhq/issues/7105 See: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/130
* | Add option to disallow users from registering any application to use GitLab ↵user-oauth-applicationsDouwe Maan2015-05-291-0/+1
| | | | | | | | as an OAuth provider
* | Merge pull request #9318 from jvanbaarsen/allow-special-chars-bioDmitriy Zaporozhets2015-05-291-1/+1
|\ \ | | | | | | Allow special characters in users bio
| * | Allow special characters in users bioJeroen van Baarsen2015-05-281-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **What does this do?** It removes the very strict sanitation on the users bio field, so that people can have a bio like "I <3 GitLab" **Why is this needed?** Currently when you enter a bio with "I <3 GitLab", we only store "I ". This is unexpected behaviour, since we want users to have a normal profile, without having to worry what characters are allowed and which are not. **Related issues:** Fixes https://github.com/gitlabhq/gitlabhq/issues/5625 Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* | You can not remove user if he/she is an only owner of groupDmitriy Zaporozhets2015-05-281-0/+4
|/ | | | | | | To prevent loose of group data you need to transfer or remove group first before you can remove user Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Fix project snippets button appearing when it is disabledStan Hu2015-05-271-1/+1
| | | | Closes #1705
* Merge branch 'accepted-rejected-mrs' into 'master'Dmitriy Zaporozhets2015-05-271-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Accepted and Rejected tabs to MR lists. Before, MRs were referred to as Merged or Closed, but the Merge button on the MR page read "Accept Merge Request", the activity feed even read "X accepted merge request Y", and the Closed tab on the MR index included both Merged _and_ Closed MRs. I've changed every occurrence to consistently refer to MRs as either Accepted or Rejected, which is less technical and more clearly two opposites. ![Screen_Shot_2015-05-25_at_17.02.31](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b0bf43aa1b5b9898a1c6b204dbcf669a/Screen_Shot_2015-05-25_at_17.02.31.png) ![Screen_Shot_2015-05-25_at_17.02.47](https://gitlab.com/gitlab-org/gitlab-ce/uploads/2ac05b1e1dba3b2d1692bd9242078f3a/Screen_Shot_2015-05-25_at_17.02.47.png) ![Screen_Shot_2015-05-25_at_17.03.03](https://gitlab.com/gitlab-org/gitlab-ce/uploads/4c0f0fa869c9130a6af18d80a1c6ebed/Screen_Shot_2015-05-25_at_17.03.03.png) Addresses internal issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2201. See merge request !702
| * Consistently refer to MRs as either Accepted or Rejected.Douwe Maan2015-05-251-1/+1
| |
* | Merge branch 'rs-to_reference' into 'master'Dmitriy Zaporozhets2015-05-2713-35/+311
|\ \ | | | | | | | | | | | | | | | | | | | | | Add to_reference method to referable models Now there is a single source of information for which attribute a model uses to be referenced, and its special character. See merge request !641
| * | More SystemNoteService cleanuprs-to_referenceRobert Speicher2015-05-262-4/+4
| | |
| * | Surround Project.reference_pattern in parenthesis inside other patternsRobert Speicher2015-05-264-4/+7
| | |
| * | Make `cross_project_reference?` less magicalRobert Speicher2015-05-261-4/+3
| | |
| * | Support only double quotes for multi-word label referencesRobert Speicher2015-05-261-6/+4
| | |
| * | Minor documentation updatesRobert Speicher2015-05-262-2/+2
| | |
| * | Add `reference_pattern` to Referable modelsRobert Speicher2015-05-2611-9/+114
| | |
| * | Update CommitRange#to_reference to use full SHAsRobert Speicher2015-05-261-3/+6
| | | | | | | | | | | | We only want them shortened by the filter, which calls to_s
| * | Implement gfm_reference directly in MentionableRobert Speicher2015-05-264-19/+8
| | | | | | | | | | | | Except for Note, which still overrides it.
| * | Minor model spec cleanupsRobert Speicher2015-05-261-1/+2
| | | | | | | | | | | | Snippet model was missing project association
| * | Add `to_reference` for models that support referencesRobert Speicher2015-05-2610-16/+138
| | | | | | | | | | | | | | | Now there is a single source of information for which attribute a model uses to be referenced, and its special character.
| * | Add Referable concernRobert Speicher2015-05-261-0/+52
| | |
| * | Add Commit#==Robert Speicher2015-05-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Prior, comparison would use the Ruby object's ID, which got out of sync after a Spring fork and would result in erroneous test failures. Now we just check that the compared object is a Commit and then compare their underlying raw commit objects.
* | | Merge branch 'fix-hipchat-default-api-version' into 'master'Douwe Maan2015-05-271-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow HipChat API version to be blank and default to v2 ### What does this MR do? This MR fixes a regression introduced in v7.11 that requires a HipChat API version to be specified when it is supposed to be optional. ### Why was this MR needed? The "optional" HipChat API version in 57c724558 passed in a blank `api_version` when nothing was specified, and the code was not tested. This would cause a 500 Error. ### What are the relevant issue numbers? Closes #772 See merge request !718
| * | Allow HipChat API version to be blank and default to v2Stan Hu2015-05-261-1/+1
| | | | | | | | | | | | Closes #772
* | | Merge branch 'milestoneRescue' into 'master'Robert Schilling2015-05-262-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change percent_complete rescue value from 100 to 0 The percent_complete method returns a value of 100 when a ZeroDivisionError occurs. That seems like a very strange default for an error case, and results in a bug when a milestone has no corresponding issues (new, empty milestones show 100% completion). This commit changes the rescue value to 0, and subsequently fixes #1656, which reported this problem. See merge request !714
| * | | Change percent_complete rescue value from 100 to 0Jonah Bishop2015-05-262-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The percent_complete method returns a value of 100 when a ZeroDivisionError occurs. That seems like a very strange default for an error case, and results in a bug when a milestone has no corresponding issues (new, empty milestones show 100% completion). This commit changes the rescue value to 0, and subsequently fixes #1656, which reported this problem.
* | | | Use .md as extention for wiki pagesJeroen van Baarsen2015-05-261-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **What does this do?** It makes sure that when you create a wiki page via the web interface, the extention is .md instead of .markdown **Why is this needed?** When you're using Gollum locally, it will create pages with the .md extention. Also .md is the best known extention for markdown. This fix will make sure that if you're using gollum or the webinterface, the extention will be the same. **What issues does this fix?** Fixes https://github.com/gitlabhq/gitlabhq/issues/5204 Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* | | Refactor permission checks to use `can?` instead of `issues_enabled` and ↵Stan Hu2015-05-251-0/+5
|/ / | | | | | | `merge_requests_enabled`
* | Merge branch 'disabled-issues-mr-features' into 'master'Douwe Maan2015-05-251-0/+27
|\ \ | |/ |/| | | | | | | | | | | Disable "New Issue" and "New Merge Request" buttons when features are disabled in project settings Closes #1676 See merge request !691
| * Disable "New Issue" and "New Merge Request" buttons when features are ↵Stan Hu2015-05-251-0/+27
| | | | | | | | | | | | disabled in project settings Closes #1676
* | Add support for Webhook note eventsStan Hu2015-05-214-0/+6
|/ | | | Closes https://github.com/gitlabhq/gitlabhq/issues/6745
* Rename MarkdownHelper to MarkupHelperJakub Jirutka2015-05-181-3/+3
|
* Don't include users without project access in participants.Douwe Maan2015-05-151-6/+14
|
* Fix mentioning of private groups.Douwe Maan2015-05-142-3/+3
|
* Merge branch 'fix-avatar-removal' into 'master'Hannes Rosenögger2015-05-123-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | Fix bug where avatar filenames were not actually deleted from the database during removal This would result in a 404 error in certain views. The `save` call was being rolled back due to an error in the validation step. Relax the validation step so that this works. Closes #1570 See merge request !620
| * Fix bug where avatar filenames were not actually deleted from the database ↵Stan Hu2015-05-073-4/+4
| | | | | | | | | | | | | | | | | | | | | | during removal. This would result in a 404 error in certain views. The `save` call was being rolled back due to an error in the validation step. Relax the validation step so that this works. Closes #1570
* | Merge branch 'rs-system-note' into 'master'Dmitriy Zaporozhets2015-05-122-227/+18
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Add SystemNoteService class The Note model was basically two models crammed together - one handling user-created notes (i.e., comments on things) and one handling system-created notes (i.e., references). This splits out the system-specific stuff to a new SystemNoteService class. See merge request !595
| * | Check if `system` is truthy in `Note.cross_reference?`Robert Speicher2015-05-111-1/+1
| | |
| * | Add a SystemNoteService classRobert Speicher2015-05-112-210/+7
| | | | | | | | | | | | | | | There's a lot of code in the Note model that only deals with creating system notes, so we're going to split that into its own class.
| * | Simplify `Note#upvote?` and `Note#downvote?`Robert Speicher2015-05-101-17/+11
| | |
* | | Merge branch '2fa' into 'master'Dmitriy Zaporozhets2015-05-121-2/+13
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two-factor authentication Implement's Two-factor authentication using tokens. - [X] Authentication logic - [X] Enable/disable 2FA feature - [x] Make 2-step login process if 2FA enabled - [x] Backup codes - [x] Backup code removed after being used - [x] Check backup codes for mysql db (mention mysql limitation if applied) - [x] Add tests - [x] Test if https://github.com/tinfoil/devise-two-factor#disabling-automatic-login-after-password-resets applies, and address if so - [x] Wait for fixed version of `attr_encrypted` or fork and use forked version - https://github.com/attr-encrypted/attr_encrypted/issues/155 Fixes http://feedback.gitlab.com/forums/176466-general/suggestions/4516817-implement-two-factor-authentication-2fa See merge request !474