Commit Graph
2729 Commits
Author SHA1 Message Date
Robert Speicher cf7c57aaf5 Use stub_application_setting in a few more specs
These specs also failed when run by themselves before this change, so
we've likely got some kind of cross-test contamination going on.
2015-07-06 22:39:56 -04:00
Robert Speicher 4b4351a18c Add feature tag to feature specs
Not to be confused with the RSpec `type: :feature` tag, this tag is used
by the `spec:feature` Rake task for filtering/grouping specs.
2015-07-06 22:39:55 -04:00
Robert Speicher d00cb00d6b Rename NoMilestone to Milestone::None
Also refactors IssuableFinder to avoid redundant title check.
2015-07-06 22:39:55 -04:00
Robert Speicher cfd813402d Remove duplicate feature spec for filtering issues by no milestone 2015-07-06 22:39:55 -04:00
Robert Speicher 3ee3cb24d4 Allow user to filter by Issues/Merge Requests without a Milestone 2015-07-06 22:39:55 -04:00
Stan Hu 4254f09eaa Return 40x error codes if branch could not be deleted in UI 2015-07-06 09:47:22 -07:00
Dmitriy Zaporozhets 603ceea21a Add tests and improve logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-06 16:47:19 +02:00
Valery Sizov 111ebe5471 Fork visibility level fix 2015-07-06 17:40:33 +03:00
Dmitriy Zaporozhets b28714b6a9 Add docs and empty specs for applicaiton settings API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-06 15:53:08 +02:00
Dmitriy Zaporozhets f3590c83ea Merge branch 'audit_log' into 'master'
Audit log for user authentication

https://dev.gitlab.org/gitlab/gitlabhq/issues/2318

See merge request !931
2015-07-06 10:09:53 +00:00
Valery Sizov 411829fdb5 Audit log for user authentication 2015-07-06 12:36:08 +03:00
Dmitriy Zaporozhets 5f52d6a038 Merge branch 'add-irker-options' into 'master'
Add Irker service configuration options

### What does this MR do?

This MR makes a number of hard-coded Irker parameters configurable in the service settings: Irker server host, port, and default IRC URI. It also removes the "max recipient" limit since the recipient list is configurable only by the project owner, and it makes no sense to update the limit when it is implied in the recipient list already.

### Why was this MR needed?

The existing service assumed that gitlab.com was running an Irker daemon on `localhost` when it was not. Using Irker on gitlab.com thus did not work at all. This MR allows users to provide their own Irker daemons.

### Are there points in the code the reviewer needs to double check?

My main concern is whether allowing a user to specify the server/port combination would have security implications for a host. Given that HipChat and Slack allow users to do this, I didn't think this was doing anything novel.

### What are the relevant issue numbers?

* Closes #1713
* Closes #1714
* Closes gitlab-com/support-forum#139

### Screenshots

### Before

![image](https://gitlab.com/stanhu/gitlab-ce/uploads/2eb3eb815e249e9fb669fc97ecd4f3c8/image.png)

### After

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

See merge request !930
2015-07-06 08:57:16 +00:00
Stan Hu d4be82d1c9 Add Irker service configuration options
Closes #1713
Closes #1714
Closes gitlab-com/support-forum#139
2015-07-05 06:40:56 -07:00
Steve Norman b3a751112d Allow user to be blocked and unblocked via the API 2015-07-03 11:17:57 +00:00
Stan Hu 3e738e3b9a Add support for unlocking users in admin settings
Closes https://github.com/gitlabhq/gitlabhq/issues/9381
2015-07-02 04:22:51 -07:00
Darby c611b6f623 Comment box/Placeholder text redo 2015-07-01 15:49:31 -07:00
Dmitriy Zaporozhets 2e6bbb12f8 Refactor can_be_merged logic for merge request
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-01 17:24:03 +02:00
Stan Hu 9add3e6eb5 Extract the longest-matching ref from a commit path when multiple matches occur
Closes #1839
2015-07-01 07:01:59 -07:00
Dmitriy Zaporozhets 2d85458ac7 Merge branch 'fix-zero-sha-lookup' into 'master'
Repository#blob_at should return nil for 00000000... sha

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

See merge request !916
2015-07-01 09:30:43 +00:00
Dmitriy Zaporozhets 87df927f20 Merge branch 'reporter-manage-issues' into 'master'
Reporter role can manage issue tracker now

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

See merge request !908
2015-07-01 09:19:56 +00:00
Dmitriy Zaporozhets baf12f45d8 Repository#blob_at should return nil for 00000000... sha
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-01 11:02:37 +02:00
Robert Speicher 42b643f057 Fix ApplicationHelper specs
There were several specs that were failing when run by themselves.

- Use the `helper` object, as per RSpec 3 standards
- Use `assign` to assign instance variables that helpers expect
- Add `StubConfiguration` support module
2015-06-30 17:47:53 -04:00
Robert Speicher 366799bbf1 Add spec/support/factory_girl
Just for consistency with our Capybara, DatabaseCleaner, WebMock, etc.
setups.
2015-06-30 17:47:53 -04:00
Dmitriy Zaporozhets a5b54f919a Reporter role can manage issue tracker now
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-30 13:33:02 +02:00
Dmitriy Zaporozhets 88162f6970 Merge branch 'fix-relative-submodule-namespace-path' into 'master'
Fix Error 500 when relative submodule resolves to a namespace that has a different name from its path

### What does this MR do?

This MR fixes a bug in resolving a namespace when the `name` differed from `path`.

### Why was this MR needed?

The original code was using `name`, when the proper input to `namespace_project_path` was `path`.

### What are the relevant issue numbers?

Closes #1849

See merge request !864
2015-06-29 14:04:04 +00:00
Robert Speicher f6503f71f9 Remove disableButtonIf[Any]EmptyField calls from forms
These have been replaced by the "requiresInput" behavior.
2015-06-26 22:07:59 -04:00
Robert Speicher e4472cee78 Add "Requires Input" JS behavior 2015-06-26 22:06:42 -04:00
Dmitriy Zaporozhets 9f166a8649 Merge branch 'rename-abilities' into 'master'
Rename abilities to correspond contoller/model action names

write_ was renamed to create_
modify_  was renamed to update_

So now in update action we have next code

```
def create
  can?(current_user, :create_issue, @issue)
end

def update
  can?(current_user, :update_issue, @issue)
end
```

See merge request !896
2015-06-26 16:39:17 +00:00
Dmitriy Zaporozhets 06ab7d89f9 Merge branch 'rs-issue-1887' into 'master'
Reorder MergeRequestTabs constructor

The tab was being activated before we set the `[commits|diffs]Loaded`
variable, so even when the `/diffs` route is accessed directly, like
from the "Side-by-side" link, the tab was being loaded from its default
source.

Fixes #1887

See merge request !892
2015-06-26 16:17:07 +00:00
Dmitriy Zaporozhets 342d553709 Rename abilities to correspond contoller/model action names
write_ was renamed to create_
modify_  was renamed to update_

So now in update action we have next code

def create
  can?(current_user, :create_issue, @issue)
end

def update
  can?(current_user, :update_issue, @issue)
end

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-26 15:55:56 +02:00
Dmitriy Zaporozhets b9fa82daee Update tests and use js-issuable class for context form
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-26 15:05:30 +02:00
Robert Speicher e14d517b61 Fix merge request diff features 2015-06-25 21:30:18 -04:00
Dmitriy Zaporozhets 9c0229732a Merge branch 'rs-random-placeholder-tip' into 'master'
Show a random Markdown tip in the textarea placeholder

cc @darby

See merge request !879
2015-06-25 08:59:54 +00:00
Robert Speicher 09f2bec64c Prefix random Markdown tips with "Tip:" 2015-06-24 18:43:57 -04:00
Robert Speicher d2de219f6c Merge branch 'add-2fa-status-to-admin-api' into 'master'
Add 2FA status to user admin API

This MR adds the `two_factor_enabled` field to the admin's API to indicate whether a given user has enabled 2FA.

See merge request !881
2015-06-24 19:24:20 +00:00
Stan Hu 6548e9b48c Add 2FA status to user admin API
Closes https://github.com/gitlabhq/gitlabhq/issues/9391
2015-06-23 22:41:59 -07:00
Robert Speicher 82a671704d Show a random Markdown tip in the textarea placeholder 2015-06-23 21:00:10 -04:00
Robert Speicher e9b65a3e05 Only look up Commit authors/committers by email
- Removes looking up authors/committers by name
- Renames `User.find_for_commit` to `User.find_by_any_email`
2015-06-23 18:07:15 -04:00
Stan Hu 774b7ee277 Fix Error 500 when relative submodule resolves to a namespace that has a different name from its path
Closes #1849
2015-06-23 05:49:19 -07:00
Stan Hu e80d7a804f Fix error when deleting a user who has projects
Closes #1856
Closes https://github.com/gitlabhq/gitlabhq/issues/9394
2015-06-23 04:39:49 -07:00
Dmitriy Zaporozhets 883438970d Merge branch 'rubocop-for-tests' into 'master'
Enable rubocop for tests too

cc @DouweM @rspeicher

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

See merge request !862
2015-06-23 10:36:36 +00:00
Dmitriy Zaporozhets f189c36d8d Merge branch 'rs-dev-issue-2414' into 'master'
Allow Admin to filter users by 2FA status

> ![Screen_Shot_2015-06-19_at_4.38.12_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/deba7f2a6b8d1548c1d1ac401e0e35a1/Screen_Shot_2015-06-19_at_4.38.12_PM.png)

Closes internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2414

See merge request !852
2015-06-23 08:48:22 +00:00
Dmitriy Zaporozhets 779646ef38 Fix rubocop issues after merge of recent master
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-23 10:46:29 +02:00
Dmitriy Zaporozhets f40b99d02e Merge branch 'master' into rubocop-for-tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	spec/features/issues_spec.rb
	spec/models/forked_project_link_spec.rb
	spec/models/hooks/service_hook_spec.rb
	spec/models/hooks/web_hook_spec.rb
	spec/models/project_services/hipchat_service_spec.rb
	spec/requests/api/project_members_spec.rb
	spec/requests/api/projects_spec.rb
	spec/requests/api/system_hooks_spec.rb
	spec/services/archive_repository_service_spec.rb
	spec/support/matchers.rb
	spec/tasks/gitlab/backup_rake_spec.rb
2015-06-23 10:44:03 +02:00
Dmitriy Zaporozhets 4aa1fdd347 Merge branch 'fix-project-icon-links' into 'master'
Fix avatar tests to use banana_sample.gif

Fixes tests that were broken in f5e0e5c0 due to the purge of `gitlab_logo.png`.

See merge request !866
2015-06-23 08:32:21 +00:00
Stan Hu 9369adb93d Fix Style/NonNilCheck cop violations 2015-06-22 22:26:41 -07:00
Stan Hu 52aa21b12d Fix Style/IndentationWidth cop violations 2015-06-22 22:25:40 -07:00
Stan Hu 3446bea719 Fix Style/CaseIndentation cop violations 2015-06-22 22:25:21 -07:00
Stan Hu 359ed48638 Fix Style/AlignHash cop violations 2015-06-22 22:24:39 -07:00
Robert Speicher dcfce8b198 Use alias_attribute to define User#two_factor_enabled 2015-06-22 21:14:07 -04:00