Commit Graph
2020 Commits
Author SHA1 Message Date
Eric Maziade 84a414fe53 Add session expiration delay configuration through UI application
settings
2015-06-05 11:50:37 -04:00
Daniel Gerhardt 7f3eb42f4e Fix external issue tracker hook/test for HTTPS URLs
If HTTPS was used for 'project_url', an error was raised because a HTTP
connection was established to the default HTTPS port.

The code has been corrected and simplified by using HTTParty.
Additionally, the request now is made directly to the 'project_url'
instead of the extracted root path.
2015-06-05 17:00:19 +02:00
Jeroen van Baarsen fbdaf0e2a5 Update noteable after a new note is added
**What does this do?**
It makes sure that whenever a new note is added to an noteable item, the
updated_at of that item is also updated.

**Why is this needed?**
At this moment when you post a comment on an issue or add a label to an issue,
the updated_at is not changed. Because of this the filtering for least recently
updated is not really useful (since it only takes in account the original text
from the noteable).

Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-06-05 15:22:55 +02:00
Dmitriy Zaporozhets b9219469f7 Merge branch 'make-namespaces-api-available-to-all-users' into 'master'
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
2015-06-04 15:59:17 +00:00
Dmitriy Zaporozhets 53a0ac4734 Skip repo removing whem remove user or group
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-03 16:16:27 +02:00
Dmitriy Zaporozhets 47a95754de Log group creation and removal
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-03 16:15:58 +02:00
Dmitriy Zaporozhets 1edff53444 Remove projects before group/user. Remove namespace directory async
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-03 14:57:12 +02:00
Valery Sizov b931c11e1b GitLab CI service sends gitlab-ci.yml file 2015-06-02 16:46:01 +03:00
Dmitriy Zaporozhets 8997812626 Remove files in web editor using rugged
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-02 11:41:21 +02:00
Dmitriy Zaporozhets 734a4ba87d Create and edit files in web editor via rugged
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-01 20:49:11 +02:00
Alex Lossent 60225a067d Allow to configure a URL to show after sign out 2015-05-29 18:20:15 +02:00
Dmitriy Zaporozhets a1c45338f3 Merge branch 'support-edit-target-branch-in-mr' into 'master'
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
2015-05-29 15:01:54 +00:00
Douwe Maan 96d6fdc27c Add option to disallow users from registering any application to use GitLab as an OAuth provider 2015-05-29 13:29:16 +02:00
Stan Hu 5e4384ec9b Support editing target branch of merge request
Closes https://github.com/gitlabhq/gitlabhq/issues/7105
See: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/130
2015-05-29 04:08:08 -07:00
Dmitriy Zaporozhets d047d299bf Merge pull request #9318 from jvanbaarsen/allow-special-chars-bio
Allow special characters in users bio
2015-05-29 10:41:01 +02:00
Stan Hu 67992b9be6 Make namespace API available to all users
Closes https://github.com/gitlabhq/gitlabhq/issues/9328
2015-05-28 11:39:12 -07:00
Dmitriy Zaporozhets 499154518a You can not remove user if he/she is an only owner of group
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>
2015-05-28 12:00:02 +02:00
Jeroen van Baarsen 3865a1d925 Allow special characters in users bio
**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>
2015-05-28 10:45:22 +02:00
Stan Hu ab88b7da19 Fix project snippets button appearing when it is disabled
Closes #1705
2015-05-27 05:07:44 -07:00
Dmitriy Zaporozhets 9eec0d5436 Merge branch 'accepted-rejected-mrs' into 'master'
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
2015-05-27 11:40:36 +00:00
Dmitriy Zaporozhets 701c2e9a3b Merge branch 'rs-to_reference' into 'master'
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
2015-05-27 10:03:14 +00:00
Douwe Maan 62d0ce19ed Merge branch 'fix-hipchat-default-api-version' into 'master'
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
2015-05-27 07:27:03 +00:00
Stan Hu 0c9463174b Allow HipChat API version to be blank and default to v2
Closes #772
2015-05-26 21:57:24 -07:00
Robert Speicher 3cb6a33846 More SystemNoteService cleanup 2015-05-26 16:30:07 -04:00
Robert Speicher 1a9da9178c Surround Project.reference_pattern in parenthesis inside other patterns 2015-05-26 15:49:22 -04:00
Robert Speicher 5cc9b17b8a Make cross_project_reference? less magical 2015-05-26 15:49:21 -04:00
Robert Speicher 81a09bc74c Support only double quotes for multi-word label references 2015-05-26 15:49:20 -04:00
Robert Speicher 1a277c5025 Minor documentation updates 2015-05-26 15:48:32 -04:00
Robert Speicher b88da58cb6 Add reference_pattern to Referable models 2015-05-26 15:48:32 -04:00
Robert Speicher 136ab73803 Update CommitRange#to_reference to use full SHAs
We only want them shortened by the filter, which calls to_s
2015-05-26 15:48:31 -04:00
Robert Speicher 0359d41b06 Implement gfm_reference directly in Mentionable
Except for Note, which still overrides it.
2015-05-26 15:48:31 -04:00
Robert Speicher 8773f339a3 Minor model spec cleanups
Snippet model was missing project association
2015-05-26 15:48:30 -04:00
Robert Speicher c0faf91ff2 Add to_reference for models that support references
Now there is a single source of information for which attribute a model
uses to be referenced, and its special character.
2015-05-26 15:48:30 -04:00
Robert Speicher b06dc74d61 Add Referable concern 2015-05-26 15:48:30 -04:00
Robert Speicher 38cd3d6451 Add Commit#==
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.
2015-05-26 15:48:29 -04:00
Robert Schilling 0ec1e4c028 Merge branch 'milestoneRescue' into 'master'
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
2015-05-26 19:12:27 +00:00
Jonah Bishop 8b92946b54 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.
2015-05-26 14:57:53 -04:00
Jeroen van Baarsen fa2aee5048 Use .md as extention for wiki pages
**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>
2015-05-26 18:12:46 +02:00
Stan Hu 9bcd36396b Refactor permission checks to use can? instead of issues_enabled and merge_requests_enabled 2015-05-25 16:51:04 -07:00
Douwe Maan ebe9c89082 Consistently refer to MRs as either Accepted or Rejected. 2015-05-25 17:01:14 +02:00
Douwe Maan 04d4452286 Merge branch 'disabled-issues-mr-features' into 'master'
Disable "New Issue" and "New Merge Request" buttons when features are disabled in project settings

Closes #1676

See merge request !691
2015-05-25 12:04:55 +00:00
Stan Hu a7d8a7bd3d Disable "New Issue" and "New Merge Request" buttons when features are disabled in project settings
Closes #1676
2015-05-25 06:16:33 -04:00
Stan Hu deeff56967 Add support for Webhook note events
Closes https://github.com/gitlabhq/gitlabhq/issues/6745
2015-05-21 23:48:16 -04:00
Jakub Jirutka daa0925016 Rename MarkdownHelper to MarkupHelper 2015-05-18 22:51:56 +02:00
Douwe Maan 0b7c4fe048 Don't include users without project access in participants. 2015-05-15 12:46:52 +02:00
Douwe Maan 77dc71d550 Fix mentioning of private groups. 2015-05-14 13:15:13 +02:00
Hannes Rosenögger 1dd0caf4d9 Merge branch 'fix-avatar-removal' into 'master'
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
2015-05-12 14:46:58 +00:00
Dmitriy Zaporozhets 1a1e42ad31 Merge branch 'rs-system-note' into 'master'
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
2015-05-12 10:45:42 +00:00
Dmitriy Zaporozhets 4a373be861 Merge branch '2fa' into 'master'
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
2015-05-12 09:41:27 +00:00
Robert Speicher b94c6d9f5b Check if system is truthy in Note.cross_reference? 2015-05-11 00:01:16 -04:00