1. 16 Mar, 2015 10 commits
    • Dmitriy Zaporozhets's avatar
      Merge branch 'fix-restricted-visibility' into 'master' · 648f38cd
      Dmitriy Zaporozhets authored
      Restricted visibility levels - bug fix and new feature
      
      This allows admin users to override restricted visibility settings when creating and updating projects and snippets, and moves the restricted visibility configuration from gitlab.yml to the web UI.  See #1903.
      
      ## Move configuration location
      
      I added a new section to the application settings page for restricted visibility levels.  Each level has a checkbox, styled with Bootstrap to look like a toggle button.  A checked box means that the level is restricted.  I added a glowing text shadow and changed the background color for checked buttons because the default styles made it hard to distinguish between checked and unchecked.  This image shows the new section with the "Public" box checked:
      
      ![restricted_visibility_settings](https://dev.gitlab.org/Okada/gitlabhq/uploads/629562e4313f89b795e81c3bb0f95893/restricted_visibility_settings.png)
      
      ## Allow admins to override
      
      To allow admin users to override the restricted visibility levels, I had to remove the `visibility_level` validation from the `Project` class.  The model doesn't know about the `current_user`, which should determine whether the restrictions can be overridden.  We could use the creator in the validation, but that wouldn't work correctly for projects where a non-admin user is the creator and an admin tries to change the project to a restricted visibility level.
      
      The `Project::UpdateService` and `Project::CreateService` classes already had code to determine whether the current user is allowed to use a given visibility level; now all visibility level validation is done in those classes.  Currently, when a non-admin tries to create or update a project using a restricted level, these classes silently set the visibility level to the global default (create) or the project's existing value (update).  I changed this behavior to be more like an Active Model validation, where using a restricted level causes the entire request to be rejected.
      
      Project and personal snippets didn't have service classes, and restricted visibility levels weren't being enforced in the model or the controllers.  The UI disabled radio buttons for restricted levels, but that wouldn't be difficult to circumvent.  I created the `CreateSnippetService` and `UpdateSnippetService` classes to do the same restricted visibility check that the project classes do.  And since I was dealing with snippet visibility levels, I updated the API endpoints for project snippets to allow users to set and update the visibility level.
      
      ## TODO
      
      * [x] Add more tests for restricted visibility functionality
      
      cc @sytse @dzaporozhets
      
      See merge request !1655
      648f38cd
    • Hannes Rosenögger's avatar
      Merge branch 'fix-typos' into 'master' · 7b178bc7
      Hannes Rosenögger authored
      Fix typos
      
      Fix minor typo in docs and CHANGELOG.
      
      See merge request !394
      7b178bc7
    • Stan Hu's avatar
      Fix typo in CHANGELOG and add credit · 93e321e7
      Stan Hu authored
      93e321e7
    • Stan Hu's avatar
      Fix typo for HipChat doc: messaging, not message · 37973ef6
      Stan Hu authored
      37973ef6
    • Hannes Rosenögger's avatar
      Merge branch 'add-hipchat-doc' into 'master' · b3c22676
      Hannes Rosenögger authored
      Add documentation for HipChat integration
      
      This was a source of confusion here:
      
      https://github.com/gitlabhq/gitlabhq/issues/7373
      
      See merge request !393
      b3c22676
    • Stan Hu's avatar
    • Hannes Rosenögger's avatar
      Merge branch 'auto-config-git' into 'master' · d500a79d
      Hannes Rosenögger authored
      Auto config git if user forgot
      
      If git is not configured properly, let gitlab:check try to fix it by executing the commands itself instead of outputing how the user could fix it.
      
      If this fails the error is still displayed.
      
      Edit;
      Not yet added to the CHANGELOG as;
      * Im not really sure this fits in the scope of a test
      * No clue how to test this properly
      
      See merge request !383
      d500a79d
    • Zeger-Jan van de Weg's avatar
      Let the server fix unconfigured git · 67f55d9b
      Zeger-Jan van de Weg authored
      67f55d9b
    • Dmitriy Zaporozhets's avatar
      bacb05c5
    • Dmitriy Zaporozhets's avatar
      Merge branch 'team-members' into 'master' · aad3cbee
      Dmitriy Zaporozhets authored
      Use same layout and interactivity for project members as group members and make code more consistent.
      
      It's probably easiest to review the commits one by one, but keep in mind that later commits sometimes touch the same place as earlier ones, so look at the complete diff to add comments.
      
      The project members page and group members page now look and work the same, with an inline "Add members" form, member search and editing of access levels and deleting without page refresh.
      
      Before:
      
      ![Screen_Shot_2015-03-13_at_16.50.39](https://dev.gitlab.org/gitlab/gitlabhq/uploads/2cd023c48de0a643ce04df965f39e1f5/Screen_Shot_2015-03-13_at_16.50.39.png)
      
      After:
      
      ![Screen_Shot_2015-03-13_at_16.50.02](https://dev.gitlab.org/gitlab/gitlabhq/uploads/fdef480daf2859ed74f5641af1f337b3/Screen_Shot_2015-03-13_at_16.50.02.png)
      
      See merge request !1695
      aad3cbee
  2. 15 Mar, 2015 11 commits
  3. 14 Mar, 2015 19 commits