summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge branch 'fix-diff-patch-public-mr' into 'master'Dmitriy Zaporozhets2015-06-232-3/+7
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix downloading of patches on public merge requests when user logged out ### What does this MR do? This MR makes it possible to download a diff patch on a public merge request when a user is logged out. ### Why was this MR needed? An Error 500 would result when a user attempted to click on the "Email Patches" or "Plain Diff" button: ``` NoMethodError - undefined method `id' for nil:NilClass: lib/gitlab/backend/shell_env.rb:9:in `set_env' lib/gitlab/satellite/action.rb:20:in `in_locked_and_timed_satellite' lib/gitlab/satellite/merge_action.rb:49:in `diff_in_satellite' app/models/merge_request.rb:219:in `to_diff' app/controllers/projects/merge_requests_controller.rb:42:in `block (2 levels) in show' ``` ### What are the relevant issue numbers? * Closes #1225 * Closes #1854 (dup) * Closes #1858 (dup) See merge request !872
| * | Fix downloading of patches on public merge requests when user logged outStan Hu2015-06-232-3/+7
| | | | | | | | | | | | | | | | | | Closes #1225 Closes #1854 Closes #1858
* | | Merge branch 'admin-edit-identities' into 'master'Dmitriy Zaporozhets2015-06-231-0/+19
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Admin can see, edit and remove user identities Related to #1415 and https://dev.gitlab.org/gitlab/gitlabhq/issues/2224 Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> See merge request !843
| * \ \ Merge branch 'master' into admin-edit-identitiesDmitriy Zaporozhets2015-06-223-1/+9
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: app/views/admin/users/show.html.haml
| * | | Make provider a select for identities form in admin areaDmitriy Zaporozhets2015-06-221-0/+19
| | |/ | |/| | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | Fix error when deleting a user who has projectsStan Hu2015-06-231-1/+1
| |/ |/| | | | | | | Closes #1856 Closes https://github.com/gitlabhq/gitlabhq/issues/9394
* | Merge branch 'nginx_defaulthost_documentation' into 'master'Dmitriy Zaporozhets2015-06-222-0/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Close #178 Nginx conf default_host documentation This closes #178 We're just making it clear that some nginx installs such as by default on recent Ubuntu's, the /etc/nginx/sites-enabled/default file will conflict the listen line of the gitlab nginx conf's due to the default_server directive. changed installation.md to identify the issue to a user added notes to both nginx configs for gitlab and gitlab-ssl [ci-skip See merge request !225
| * | fixed typoLuke Ashe-Browne2014-12-031-2/+2
| | |
| * | adding notes to gitlab nginx confLuke Ashe-Browne2014-12-032-1/+9
| | | | | | | | | | | | | | | We want to make users aware that the nginx default config will conflict with the gitlab default_server conf file.
* | | Merge branch 'restore_uploads_fix' into 'master'Dmitriy Zaporozhets2015-06-221-1/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid "cannot copy directory ... to itself" error on restore (on Docker?) rake gitlab:backup:restore fails for me in my Docker-hosted Gitlab-CE instance; during the restore, any existing "uploads" directory is backed up by [this code](https://gitlab.com/gitlab-org/gitlab-ce/blob/833bc30/lib/backup/uploads.rb#L23) -- ```ruby def backup_existing_uploads_dir timestamped_uploads_path = File.join(app_uploads_dir, '..', "uploads.#{Time.now.to_i}") if File.exists?(app_uploads_dir) FileUtils.mv(app_uploads_dir, timestamped_uploads_path) end end ``` When this executes for me, the ```FileUtils.mv``` parameters are "/home/git/gitlab/public/uploads" and "/home/git/gitlab/public/uploads/../uploads.1407019546"; an exception is raised, producing this double stacktrace: ``` ArgumentError: cannot copy directory /home/git/gitlab/public/uploads to itself /home/git/gitlab/public/uploads/../uploads.1407019546 /home/git/gitlab/lib/backup/uploads.rb:26:in `backup_existing_uploads_dir' /home/git/gitlab/lib/backup/uploads.rb:18:in `restore' /home/git/gitlab/lib/tasks/gitlab/backup.rake:73:in `block (4 levels) in <top (required)>' /home/git/gitlab/lib/tasks/gitlab/backup.rake:30:in `block (3 levels) in <top (required)>' Errno::EXDEV: Invalid cross-device link @ sys_fail2 - (/home/git/gitlab/public/uploads, /home/git/gitlab/public/uploads/../uploads.1407019546) /home/git/gitlab/lib/backup/uploads.rb:26:in `backup_existing_uploads_dir' /home/git/gitlab/lib/backup/uploads.rb:18:in `restore' /home/git/gitlab/lib/tasks/gitlab/backup.rake:73:in `block (4 levels) in <top (required)>' /home/git/gitlab/lib/tasks/gitlab/backup.rake:30:in `block (3 levels) in <top (required)>' Tasks: TOP => gitlab:backup:uploads:restore (See full trace by running task with --trace) ``` I'm guessing from the first message that ```mv``` walks the destination path to ensure that we're not moving the source into itself -- it doesn't get as far as interpreting the '..', but throws when it sees that the destination appears to start with the source path. The second stacktrace I have no clue about - maybe it's AUFS- or Docker-related? I attempted to reproduce this separately with the omnibus distribution in a fresh Ubuntu 14.04 install without Docker involved, and was unable to - backup and restore worked fine. I then tested my theory by FileUtils.expand_path-ing the destination in my own Docker setup code, and that made the problem go away, so that's what this merge request does. (I'm using backups created and restored on gitlab-ce 7-1-stable, at facfec4b2; this is on Ubuntu 14.04 with Docker 1.1.1) I know I'd look askance at a PR without tests for an unreproducable problem, but even if this is rejected, I'm submitting it anyway because maybe someone else will Google it and find it useful. I'm happy to do more work to improve this if you have suggestions. See merge request !165
| * | Avoid "cannot copy directory to itself" restore errorBryan Stearns2014-08-031-1/+1
| | |
* | | Fix behavior of ldap_person method in Gitlab::OAuth::UserAlex Lossent2015-06-171-4/+5
| | | | | | | | | | | | | | | 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.
* | | Dont set checkout sha for removed branch/tagDmitriy Zaporozhets2015-06-151-2/+5
| | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | Merge branch 'update_ssl_ciphers' into 'master'Dmitriy Zaporozhets2015-06-151-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Update SSL ciphers per logjam vulnerability recommendations.update_ssl_ciphersMarin Jankovski2015-06-151-1/+1
| | | |
* | | | Add Gitlab::Themes module; remove Gitlab::ThemeRobert Speicher2015-06-132-50/+67
|/ / / | | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'feature-session-expire-seconds-ui' into 'master'Douwe Maan2015-06-121-1/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | session_expire_seconds => session_expire_delaythemaze752015-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | delay is in seconds more legible code in session_store Added `GitLab restart required` help block to session_expire_delay
| * | | Add session expiration delay configuration through UI applicationEric Maziade2015-06-051-1/+2
| | | | | | | | | | | | settings
* | | | Merge branch 'note_about_omnibus_changes' into 'master'Dmitriy Zaporozhets2015-06-122-2/+14
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | Add a note that changing example configuration files requires changing ↵note_about_omnibus_changesMarin Jankovski2015-06-112-2/+14
| | | | | | | | | | | | | | | | | | | | omnibus-gitlab.
* | | | | Merge pull request #9371 from zenati/patch-2Dmitriy Zaporozhets2015-06-112-3/+3
|\ \ \ \ \ | |/ / / / |/| | | | An `in_namespace` scope is already present
| * | | | An `in_namespace` scope is already presentzenati2015-06-092-3/+3
| | | | |
* | | | | Merge branch 'rs-pre-rspec-3' into 'master'Dmitriy Zaporozhets2015-06-103-4/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | Define GITORIOUS_HOST only onceRobert Speicher2015-06-103-4/+5
| | | | | |
* | | | | | Merge branch 'master' into 'master'Dmitriy Zaporozhets2015-06-101-1/+2
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | use gitlab not gitlabciJeroen Nijhof2015-06-091-1/+1
| | | | | |
| * | | | | update fog to 1.25.0 and add multipart upload supportJeroen Nijhof2015-06-091-1/+2
| |/ / / /
* | | | | Revert "No need to check if `repository_ref` is present"Jeroen van Baarsen2015-06-091-1/+5
|/ / / /
* | | | No need to check if `repository_ref` is presentzenati2015-06-081-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* | | | Merge branch 'refactor-web-editor' into 'master'Dmitriy Zaporozhets2015-06-051-24/+26
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | Fix editing files via APIDmitriy Zaporozhets2015-06-051-24/+26
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | | | Merge branch 'cernvcs/gitlab-ce-feature/auto_link_ldap_omniauth'Douwe Maan2015-06-051-3/+60
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Tweak code.cernvcs/gitlab-ce-feature/auto_link_ldap_omniauthDouwe Maan2015-06-051-21/+24
| | | | |
| * | | | Add option to automatically link omniauth and LDAP identitiesAlex Lossent2015-06-031-4/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge branch 'maser/gitlab-ce-order-commit-comments-in-api' into 'master'Dmitriy Zaporozhets2015-06-051-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | Order commit comments in API chronologicallyMartin Luder2015-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | Merge branch 'fix-upgrader-script' into 'master'Dmitriy Zaporozhets2015-06-041-3/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | | Fix upgrader scriptMartins Polakovs2015-05-231-3/+8
| | | | | | |
* | | | | | | Merge branch 'make-namespaces-api-available-to-all-users' into 'master'Dmitriy Zaporozhets2015-06-041-5/+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-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes https://github.com/gitlabhq/gitlabhq/issues/9328
* | | | | | | | Merge branch 'trigger_hooks_create_on_backup_restore' into 'master'Dmitriy Zaporozhets2015-06-041-0/+3
|\ \ \ \ \ \ \ \ | |_|_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | | | Trigger hooks-create on gitlab backup restore.Marin Jankovski2015-06-031-0/+3
| | |_|_|/ / / | |/| | | | |
* | | | | | | Merge branch 'fix-group-remove' into 'master'Dmitriy Zaporozhets2015-06-031-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * \ \ \ \ \ \ Merge branch 'repo-remove' into fix-group-removeDmitriy Zaporozhets2015-06-031-4/+10
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: spec/features/projects_spec.rb
| * | | | | | | | Wrap group removal into serviceDmitriy Zaporozhets2015-06-031-1/+1
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | | | | | | Merge branch 'remove_unecessary_rake_task' into 'master'Dmitriy Zaporozhets2015-06-032-56/+34
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | | | | Add autocrlf back to installation docs, add a check for it.Marin Jankovski2015-06-032-2/+33
| | | | | | | | |
| * | | | | | | | Remove gitlab:env:check task.remove_unecessary_rake_taskMarin Jankovski2015-06-031-54/+1
| |/ / / / / / /
* | | | | | | | Merge branch 'repo-remove'Dmitriy Zaporozhets2015-06-031-4/+10
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| / / / / / / | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: spec/features/projects_spec.rb