Commit Graph
8416 Commits
Author SHA1 Message Date
Douwe Maan 4ffa34a4d6 Only show historical active user cound when current doesn't exceed limit. 2015-05-07 22:52:52 +02:00
Douwe Maan 45ab4d10ef Validate historical active user count when uploading license. 2015-05-07 22:38:22 +02:00
Douwe Maan 85c04a8aa6 Track historical active user count. 2015-05-07 22:38:17 +02:00
Douwe Maan fbb011be38 Merge branch 'license' into 'master'
Allow license to be uploaded and enforce its validity.

Addresses #274.

Still a work in progress, there are no tests yet, some things need extra validation or prettier error messages, and we're not doing anything to enforce active user count yet. Still, the flow stands! Let me know what you think :)

- [x] Check active user count at moment of upload
- [x] Prettier validation / error message when license is invalid
- [x] Prettier error when public key is invalid
- [x] Tests
- [x] Work on copy

These will go into separate MRs as they require more discussion:

- Check historic active user count over past year
- Add application setting to disallow creating/activating new user when limit is reached

-----

No license:

![no_license](https://dev.gitlab.org/gitlab/gitlab-ee/uploads/41168c7141b3c121f2d3137b8566f467/no_license.png)

Also shown when pushing code:

![no_license_shell](https://dev.gitlab.org/gitlab/gitlab-ee/uploads/bc11926a59b266d28ffd61b3de48d54b/no_license_shell.png)

The "Upload a new license in the admin area" part is only for admins, regular users will see "Ask an admin to upload a new license".

Upload page in admin area:

![upload_license](https://dev.gitlab.org/gitlab/gitlab-ee/uploads/44d28581dd0629e67fb014a817ca5675/upload_license.png)

License details in admin area:

![license](https://dev.gitlab.org/gitlab/gitlab-ee/uploads/8836f2b6e0bf8db28673d758eb57338b/license.png)

Notice of a license that will expire: Also notice the license history at the bottom.

![license_will_expire](https://dev.gitlab.org/gitlab/gitlab-ee/uploads/5396b6b3e46f5bb53d5ce33cf5bd23ea/license_will_expire.png)

Notice of an expired license:

![license_expired](https://dev.gitlab.org/gitlab/gitlab-ee/uploads/d4b582a212738054f52ed1909e45568d/license_expired.png)

cc @dzaporozhets @sytse

See merge request !383
2015-05-07 18:54:47 +00:00
Dmitriy Zaporozhets 23b4cc060f Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ce-to-ee
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	db/schema.rb
2015-05-06 14:28:11 +03:00
Stefan Tatschner dc68179b59 Fix a trailing new line
The "How to Merge" modal included a trailing new line in the code
block. This commit removes that disfigurement.
2015-05-06 11:10:48 +02:00
Jeroen van Baarsen 2856d5f9fc Merge pull request #9241 from Soullivaneuh/button-type
Fix missing button types
2015-05-06 10:19:17 +02:00
Dmitriy Zaporozhets bb3d7b0558 Merge branch 'refactor-project-page' into 'master'
Improve project home page usability

I looked at project page and saw next problems with it:

* a lot of information but not separated on blocks - hard to understand
* unclear how to contribute to project

Instead of complete redesign I followed step-by-step changes.

### Step 1

First of all I separated Repository and Contribution blocks.
Contribution block should makes it easy for people to contribute. Even when we visit GitHub project page its not clear how to start. Our Contribution section should help with it. All repository stats and download button moved to Repository block.

![Screenshot_2015-05-05_11.49.16](https://gitlab.com/gitlab-org/gitlab-ce/uploads/e69977603acfdc381acb539b19e8cba1/Screenshot_2015-05-05_11.49.16.png)

### Step 2

Next step was to make top section less loaded. I moved clone panel to sidebar because it is very heavy element and rarely used. If you use web editor - you dont even use it. If you work via http/ssh you will copy remote only once. So my idea - it should be on home page but should not be in center of attention.

![Screenshot_2015-05-05_12.47.04](https://gitlab.com/gitlab-org/gitlab-ce/uploads/41633cc8915bb12c979230567b40aea4/Screenshot_2015-05-05_12.47.04.png)

See merge request !610
2015-05-06 08:14:10 +00:00
Robert Schilling 9184657871 Merge branch 'fix-devise-email-display-name' into 'master'
Use the configured display name in e-mails from Devise mailer

By default, it is set to "GitLab", but a user may configure the display name to something else.

See merge request !613
2015-05-06 06:20:21 +00:00
Stan Hu 1dc906d586 Use the configured display name in e-mails from Devise mailer 2015-05-05 19:54:21 -07:00
Stan Hu a1c6f7ce20 Improve help line for restricted domain signups 2015-05-05 19:46:37 -07:00
Dmitriy Zaporozhets cecfbd55de Restlye project sidebar a bit to make it more clear
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-05 19:38:53 +03:00
Dmitriy Zaporozhets 3b0cf49f33 Fix project description and avatar alignment
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-05 19:25:18 +03:00
Dmitriy Zaporozhets ac7b12c0e8 Fix right margin for project description
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-05 18:34:05 +03:00
Dmitriy Zaporozhets ebcc810b9d Remove project dropdown and fix db sche,a
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-05 18:29:23 +03:00
Dmitriy Zaporozhets 30c6dbe36d Show CI link on project home page only if CI enabled
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-05 17:30:50 +03:00
Dmitriy Zaporozhets 040ee6f897 Reorganize elements in project sidebar
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-05 16:45:53 +03:00
Douwe Maan 97bfd764b7 Add feature specs for license upload. 2015-05-05 14:13:57 +02:00
Douwe Maan f00e1d3dda Add page titles. 2015-05-05 13:04:25 +02:00
Douwe Maan 2bb2ade50d Merge branch 'master' into license
# Conflicts:
#	db/schema.rb
2015-05-05 13:03:33 +02:00
Valery Sizov 2144cc710a fix gitlab CI links 2015-05-05 14:02:31 +03:00
Douwe Maan caa09e6951 Add License unit test. 2015-05-05 13:02:17 +02:00
Douwe Maan 5a14f5a49e Tweak flash messages around license upload/removal. 2015-05-05 12:19:47 +02:00
Douwe Maan 60323c6143 Validate that new license hasn't expired already. 2015-05-05 12:19:33 +02:00
Dmitriy Zaporozhets 7da7a790fa Move clone panel to sidebar
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-05 13:09:50 +03:00
Douwe Maan 6d093d84b1 Show prettier error message when license file is invalid. 2015-05-05 11:49:28 +02:00
Douwe Maan 6ff860d1fe Show nice error when no license was selected. 2015-05-05 10:54:07 +02:00
Douwe Maan 10e6aa62b9 Validate number of active users at time of upload. 2015-05-05 10:53:51 +02:00
Dmitriy Zaporozhets 4adac0b4be Remove unnecessary info from project home page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-05 11:49:49 +03:00
Dmitriy Zaporozhets 478a4b19da Turn sidebar in sections with contribute and repository
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-05 11:47:01 +03:00
Douwe Maan bff1b8f8e7 More code cleanup. 2015-05-05 10:40:38 +02:00
Dmitriy Zaporozhets 3ce0557ab0 Move tabs with activity/readme to section
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-05 11:29:52 +03:00
Dmitriy Zaporozhets 31e5cd214e Move project section to own partial
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-05 11:26:27 +03:00
Dmitriy Zaporozhets 04e365ebb7 Move project sidebar to separate partial
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-05 11:23:25 +03:00
Douwe Maan 68ac20604b Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ce-to-ee
# Conflicts:
#	app/controllers/groups/application_controller.rb
#	app/services/test_hook_service.rb
#	app/views/admin/groups/show.html.haml
#	app/views/groups/_settings_nav.html.haml
#	app/views/groups/show.html.haml
#	app/views/layouts/_head.html.haml
#	app/views/projects/_settings_nav.html.haml
#	db/schema.rb
#	features/project/project.feature
#	features/steps/project/project.rb
2015-05-05 10:18:27 +02:00
Sullivan SENECHAL 5bc5188a06 Fix missing button types 2015-05-05 00:45:06 +02:00
Dmitriy Zaporozhets 16db51ec58 Merge branch 'fix-wiki-search' into 'master'
Fix Error 500 when searching Wiki pages

If a Wiki page turns up a hit in the search results, an error will occur:

```
Completed 500 Internal Server Error in 836ms

NoMethodError - undefined method `slug' for "test.markdown":String:
  app/helpers/wiki_helper.rb:10:in `namespace_project_wiki_path'
  app/views/search/results/_wiki_blob.html.haml:4:in `_app_views_search_results__wiki_blob_html_haml___2752621660395393333_70299911622700'
  actionview (4.1.9) lib/action_view/template.rb:145:in `block in render'
  activesupport (4.1.9) lib/active_support/notifications.rb:161:in `instrument'
  actionview (4.1.9) lib/action_view/template.rb:339:in `instrument'
  actionview (4.1.9) lib/action_view/template.rb:143:in `render'
```

An unhandled String containing the name of the Wiki page would be provided to the URL path generator. This MR handles that case.

Closes #1547

See merge request !592
2015-05-04 08:53:21 +00:00
Douwe Maan e9e79fdfdf Merge branch 'fix-escaped-branches-in-compare' into 'master'
Unescape branch names in compare commit

The upgrade in GitLab v7.9 to Rails v4.1.9 caused all branch names in the compare commit mode to be escaped (e.g. `/` to `%2F`). The compare mode would not always work when comparing against branch names with a forward slash.

Opted to unescape the branch name rather than use a wildcard segment to prevent escaping slashes because it seems like a more sensible URL. The slashes in this case aren't really represented by a tree structure (e.g. /compare/one/two/branch..another/branch/here).

* Closes #1399
* Closes https://github.com/gitlabhq/gitlabhq/issues/9105

See merge request !582
2015-05-04 06:58:56 +00:00
Stan Hu a3157626f1 Re-annotate models 2015-05-03 13:38:27 -07:00
Douwe Maan 257f8057a2 Minor tweaks. 2015-05-03 15:41:40 +02:00
Robert Schilling 78da7b1c48 Merge branch 'master' of github.com:gitlabhq/gitlabhq 2015-05-03 15:00:58 +02:00
Robert Schilling 5f3eef6e56 Add period at snippet visibilty description 2015-05-03 15:00:46 +02:00
Dmitriy Zaporozhets e097812f57 Merge pull request #9234 from dsander/group-milestones-by-title
Group milestones by title in the dashboard and all other issue views
2015-05-03 14:29:31 +03:00
Dmitriy Zaporozhets 4291e28af7 Merge branch 'change-primary-email' into 'master'
Allow primary email to be set to an email that you've already added.

Fixes gitlab-com/support-forum#106.

When the user sets their primary email to an email that they've already added to their account, this patch makes sure that secondary email record is destroyed, and a new email record is created for the old primary email. This is based on the assumption that in this case no email was meant to be deleted, but the user simply wanted to change which of their emails is primary.

See merge request !591
2015-05-03 11:00:51 +00:00
Dmitriy Zaporozhets 0df317f729 Merge branch 'restrict-signups-to-domains' into 'master'
Add application setting to restrict user signups to e-mail domains

This feature was requested long ago:

http://feedback.gitlab.com/forums/176466-general/suggestions/4118466-ability-to-register-only-from-ceratain-domains

This MR is based off !253 but changed to use application settings and use wildcard strings
to give more flexibility in pattern matching. Regexps seemed overkill and prone to mistakes.

Also note that validation is ONLY done on creation to prevent breaking existing users who do not have a whitelisted domain. However, this allows a user to sign-up and change his/her email to a non-whitelisted domain.

Screenshots:

![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b312046aae03971f37f4247382971fc6/image.png)

![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/94bdf3ffaf37c2e8324eff83308f81f0/image.png)

See merge request !598
2015-05-03 10:02:45 +00:00
Robert Speicher 703856c75e Merge branch 'make-reply-to-work-everywhere' into 'master'
Make Reply-To config apply to change e-mail confirmation and other notifications sent through Devise

Notifications sent through Devise were using the default From: address, and due to a broken test line nothing was actually being run.

The only way to customize the Devise Reply-To field is to use a custom mailer. Moved the e-mail configuration out of the initializers to accommodate this.

Closes #1556

See merge request !596
2015-05-02 17:48:30 +00:00
Stan Hu eb4f1eb5f5 Add application setting to restrict user signups to e-mail domains
This feature was requested long ago:

http://feedback.gitlab.com/forums/176466-general/suggestions/4118466-ability-to-register-only-from-ceratain-domains

This MR is based off !253 but changed to use application settings and use wildcard strings
to give more flexibility in pattern matching. Regexps seemed overkill and easy to get wrong.

Only restrict e-mail addresses upon creation
2015-05-02 09:36:52 -07:00
Dmitriy Zaporozhets cfbff017d0 Merge branch 'you-get-a-title-and-you-get-a-title-and-everyone-gets-a-title' into 'master'
Add a page title to every page.

![You get a title, and you get a title; everyone gets a title!](https://i.imgflip.com/kvmq8.jpg)

The `page_title` helper pushes the provided string at the end of the title, but because of the order that layouts are rendered in by ActionView, the result is always this:

```
<title from view> |
<title from as specified in the controller or by its layout> |
<title from layouts/_head>
```

For example: `Merge Requests | GitLab.org / Gitlab Community Edition | GitLab`.

All a developer needs to know is to put a `page_title` call describing the page in question at the start of every template.

To get everything where I wanted it to go without too much duplication, I had to make some changes around layouts, sidebars and controllers.

See merge request !593
2015-05-02 07:34:58 +00:00
Stan Hu 4dda17a5bf Make Reply-To config apply to change e-mail confirmation and other notifications
sent through Devise

Fix test case that was passing due to a broken `around` statement.

Closes #1556
2015-05-01 22:57:10 -07:00
Robert Speicher 99fcf2e6fe Improve/add specs for Project#get_issue and #issue_exists? 2015-05-01 13:29:36 -04:00