Commit Graph
2455 Commits
Author SHA1 Message Date
Alex Lossent d96d9aae42 Fix behavior of ldap_person method in Gitlab::OAuth::User
Code tweaks in 45e9150a caused the ldap_person method to not return expected results.
Improved tests to cover the ldap_person method, which was previously stubbed.
2015-06-17 18:06:27 +02:00
Dmitriy Zaporozhets fe51fa26a7 Dont set checkout sha for removed branch/tag
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-15 17:54:22 +02:00
Dmitriy Zaporozhets 9522a710e5 Merge branch 'update_ssl_ciphers' into 'master'
Update ssl ciphers

Removing all DHE suites from Nginx template SSL ciphers.

This will deny forward secrecy for Android 2.3.7, Java 6 and OpenSSL 0.9.8. but will give A+ rating on SSL labs.

Google sites also do not have DHE suites, [source](https://community.qualys.com/blogs/securitylabs/2013/06/25/ssl-labs-deploying-forward-secrecy)

> Google's sites, for example, tend to not have any DHE suites in their configuration. [2013]

See merge request !814
2015-06-15 11:50:21 +00:00
Marin Jankovski 86d35ed3d4 Update SSL ciphers per logjam vulnerability recommendations. 2015-06-15 11:40:00 +02:00
Robert Speicher 844d72716e Add Gitlab::Themes module; remove Gitlab::Theme
Now we can simply loop through all themes, among other things.

This also removes the `dark_theme` / `light_theme` classes and the
`theme_type` helper, since they weren't used anywhere.
2015-06-13 17:58:16 -04:00
Douwe Maan 9ea8dcb5e2 Merge branch 'feature-session-expire-seconds-ui' into 'master'
Add session expiration delay configuration through UI application

Setting is accessible by the administrator through the UI and defaults to 1 week (the current setting)

Answers the following suggestions:

  * http://feedback.gitlab.com/forums/176466-general/suggestions/6210719-make-session-length-configurable
  * http://feedback.gitlab.com/forums/176466-general/suggestions/6730512-automatic-logout-after-a-time-being-idle

See merge request !774
2015-06-12 13:50:40 +00:00
Dmitriy Zaporozhets b07cf1182f Merge branch 'note_about_omnibus_changes' into 'master'
Add a note that changing example configuration files requires changing omnibus-gitlab.

Keeping track of changes in these files is not easy and they usually require change in omnibus-gitlab.

Added a note so everyone is aware of this.

Similar is added to gitlab-shell and gitlab-ci.

Discussed in gitlab-org/omnibus-gitlab#605

See merge request !800
2015-06-12 09:02:48 +00:00
Dmitriy Zaporozhets c69ca9912e Merge pull request #9371 from zenati/patch-2
An `in_namespace` scope is already present
2015-06-11 23:09:41 +02:00
Marin Jankovski df346e9507 Add a note that changing example configuration files requires changing omnibus-gitlab. 2015-06-11 15:11:37 +02:00
themaze75andEric Maziade 1d080f5745 session_expire_seconds => session_expire_delay
delay is in seconds
more legible code in session_store
Added `GitLab restart required` help block to session_expire_delay
2015-06-10 22:10:00 -04:00
Dmitriy Zaporozhets e407a481f2 Merge branch 'rs-pre-rspec-3' into 'master'
Changes back-ported from rspec3 branch

This is just breaking up the large `road-to-rspec-3` branch a bit. Each of these commits have been cherry-picked and would be good to have in place before the upgrade.

See merge request !792
2015-06-10 14:04:12 +00:00
Dmitriy Zaporozhets 8eadfd2df7 Merge branch 'master' into 'master'
update fog to 1.25.0 and add multipart upload support

This merge will fix backup uploading problems to s3, closing gitlab-org/gitlab-ce#1059

See merge request !789
2015-06-10 12:30:44 +00:00
Robert Speicher 2f3ab0ab85 Define GITORIOUS_HOST only once 2015-06-10 01:31:27 -04:00
Jeroen Nijhof a7047569db use gitlab not gitlabci 2015-06-09 18:30:38 +02:00
Jeroen Nijhof bf7315cb13 update fog to 1.25.0 and add multipart upload support 2015-06-09 17:56:37 +02:00
Jeroen van Baarsen 25a870a6d4 Revert "No need to check if repository_ref is present" 2015-06-09 15:18:15 +02:00
zenati b0de6e9ae2 An in_namespace scope is already present 2015-06-09 13:42:01 +02:00
zenati c418261b2b No need to check if repository_ref is present
There is no need to check if `repository_ref` is present as:
```
      @repository_ref = if repository_ref.present?
                          repository_ref
                        else
                          nil
                        end
```

is as same as doing:

```
@repository_ref = repository_ref
```
2015-06-08 18:01:50 +02:00
Dmitriy Zaporozhets 87f9c475db Merge branch 'refactor-web-editor' into 'master'
Refactor web editor

* fix problem with editing non-master branch
* before commit make sure branch exists
* dont allow user change file in one branch and commit to another existing branch
* remove a lot of code duplication
* remove outdated statellite errors

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Fixes #1761

See merge request !773
2015-06-05 16:14:34 +00:00
Eric Maziade 84a414fe53 Add session expiration delay configuration through UI application
settings
2015-06-05 11:50:37 -04:00
Dmitriy Zaporozhets 7bde6ae540 Fix editing files via API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-05 17:16:51 +02:00
Douwe Maan 3f59a8f0be Merge branch 'cernvcs/gitlab-ce-feature/auto_link_ldap_omniauth' 2015-06-05 13:34:25 +02:00
Douwe Maan 45e9150a51 Tweak code. 2015-06-05 12:32:01 +02:00
Dmitriy Zaporozhets b7d20f14c6 Merge branch 'maser/gitlab-ce-order-commit-comments-in-api' into 'master'
Order commit comments in API chronologically

When fetching commit comments via API, the comments were not ordered,
but just returned in the order Postgresql finds them. Now the API always
returns comments in chronological order.

Same as !628 but with CI

See merge request !768
2015-06-05 08:38:19 +00:00
Dmitriy Zaporozhets 9287865599 Merge branch 'fix-upgrader-script' into 'master'
Fix upgrader script

This is a fix for upgrader script not guessing the latest version correctly.

Upgrader now handles versions where a version part (major/minor/patch) can have multi-digit number, also ensures that the latest version is chosen from git tags by converting tag to Gitlab::VersionInfo and than selecting the latest/greatest version.

Fixes: #1476

See merge request !695
2015-06-04 16:01:13 +00: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 e063c8f3e2 Merge branch 'trigger_hooks_create_on_backup_restore' into 'master'
Trigger hooks create on backup restore

Number of users migrating from installation from source to omnibus get this issue. This can be fixed with a bash one liner but we already have a script that creates hooks in gitlab-shell. Added to gitlab:shell:install task call to `bin/create-hooks`. This script is idempotent which means it will only rewrite hooks if something changed.

Fixes https://dev.gitlab.org/gitlab/gitlabhq/issues/2208, https://github.com/gitlabhq/gitlabhq/issues/9101 and for the most part https://github.com/gitlabhq/gitlabhq/issues/8161

See merge request !762
2015-06-04 14:46:24 +00:00
Dmitriy Zaporozhets fb59f04fdf Merge branch 'fix-group-remove' into 'master'
Group improvements

* remove projects before removing group
* execute all hooks/events from project destroy when group removed
* log group create/remove
* delay remove of namespace directory (to prevent NFS issues)

Inspired by !759

See merge request !761
2015-06-03 15:02:33 +00:00
Dmitriy Zaporozhets 8046b69761 Merge branch 'remove_unecessary_rake_task' into 'master'
Remove gitlab:env:check task.

Rake task that checks for git user git settings is a leftover from early days.

It is not being used by the web editor(and web editor is also being redone atm) so this rake task just causes confusion.

Adresses internal issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2362

See merge request !758
2015-06-03 14:59:38 +00:00
Marin Jankovski a1be236c87 Trigger hooks-create on gitlab backup restore. 2015-06-03 16:24:37 +02:00
Dmitriy Zaporozhets e414463d9e Merge branch 'repo-remove'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	spec/features/projects_spec.rb
2015-06-03 16:17:36 +02:00
Marin Jankovski 7044d649a3 Add autocrlf back to installation docs, add a check for it. 2015-06-03 15:42:22 +02:00
Dmitriy Zaporozhets 7bab4817f7 Merge branch 'repo-remove' into fix-group-remove
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	spec/features/projects_spec.rb
2015-06-03 15:15:46 +02:00
Dmitriy Zaporozhets 61cfd1d273 Wrap group removal into service
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-03 14:07:20 +02:00
Dmitriy Zaporozhets 97ff86e07c Move repository when project is removed
Ths commit does next:

* When we remove project we move repository to path+deleted.git
* Then we schedule removal of path+deleted with sidekiq
* If repository move failed we abort project removal

This should help us with NFS issue when project get removed but
repository stayed. The full explanation of problem is below:

* rm -rf project.git
* rm -rf removes project.git/objects/foo
* NFS server renames foo to foo.nfsXXXX because some NFS client (think
* Unicorn) still has the file open
* rm -rf exits, but project.git/objects/foo.nfsXXX still exists
* Unicorn closes the file, the NFS client closes the file (foo), and the
* NFS server removes foo.nfsXXX
* the directory project.git/objects/ still exists => problem

So now we move repository and even if repository removal failed

Repository directory is moved so no bugs with project removed but
repository directory taken. User still able to create new project with
same name. From administrator perspective you can easily find stalled
repositories by searching `*+deleted.git`

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-03 13:05:43 +02:00
Alex Lossent dfcea8ed51 Add option to automatically link omniauth and LDAP identities
Until now, a user needed to first sign in with his LDAP identity and then manually
link his/her account with an omniauth identity from their profile.
Only when this is done can the user authenticate with the omniauth provider and at
the same time benefit from the LDAP integration (HTTPS authentication with LDAP
username/password and in EE: LDAP groups, SSH keys etc.).
This feature automates the process by looking up a corresponding LDAP person when a
user connects with omniauth for the first time and then automatically linking the LDAP
and omniauth identities (of course, like the existing allow_single_sign_on setting,
this is meant to be used with trusted omniauth providers).
The result is identical to a manual account link.

Add config initializers for other omniauth settings.
2015-06-03 11:46:20 +02:00
Marin Jankovski 5f7d6c7d74 Remove gitlab:env:check task. 2015-06-03 11:26:57 +02:00
Dmitriy Zaporozhets 79aac2c128 Merge branch 'ignore-references' into 'master'
Don't notify users mentioned in code blocks or blockquotes.

cc @rspeicher

See merge request !753
2015-06-02 18:39:18 +00:00
Robert Speicher 9e7a9c63a5 Further limit the limited whitelist for project/group descriptions 2015-06-02 13:41:12 -04:00
Robert Speicher 023dd2907b Add a pipeline context option for SanitizationFilter
When this option is `:description`, we use a more restrictive whitelist.
This is used for Project and Group description fields.
2015-06-02 13:04:10 -04:00
Marin Jankovski c4cb563e98 Merge pull request #8730 from drunkard/master
Specify shell while run me as git user
2015-06-02 16:19:31 +02:00
Douwe Maan 1f908dc481 Fix typo. 2015-06-02 13:21:34 +02:00
Douwe Maan 94919c7ef6 Ignore references in blockquotes. 2015-06-02 13:17:21 +02:00
Douwe Maan fe78984f20 Actually ignore references in code blocks etc. 2015-06-02 13:17:11 +02:00
Dmitriy Zaporozhets d684b11054 Remove unnecessary satellite files and add CHANGELOG item
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-02 12:07:00 +02:00
Dmitriy Zaporozhets 8ad5f08483 Remove now unnecessary satelittes logic for creating and editing file with web editor
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-02 10:56:22 +02:00
Stan Hu 85145d1d77 Disable changing of the source branch in merge request update API 2015-05-29 09:40:35 -07:00
Robert Speicher 330c25385b Update jasmine:ci task to use teaspoon 2015-05-28 18:22:33 -04: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 05a44dcb8b Merge branch 'user-destroy-wo-groups' into 'master'
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>

See merge request !730
2015-05-28 13:14:58 +00:00