Robert Speicher
5ce6d18681
Add User.find_by_username!
2015-07-23 17:16:39 -04:00
Marin Jankovski
77f325a49f
Do not disappoint rubocop.
2015-07-17 17:17:33 +02:00
Marin Jankovski
c7daa5f17f
Add specs for gitlab ci service validity.
2015-07-17 17:03:15 +02:00
Robert Speicher
f3d4767d0c
Rename notice_added_references to create_new_cross_references!
2015-07-13 21:31:16 -04:00
Robert Speicher
e4c698fd5c
Refactor Mentionable#notice_added_references
...
It now accounts for models that have changed but have already been
persisted, such as when called from an UpdateService.
Closes #1773
2015-07-13 21:31:00 -04:00
Dmitriy Zaporozhets
00053c805c
Merge branch 'ssh-key-linebreaks' into 'master'
...
Add error message for SSH key linebreaks
Solves this [request](http://feedback.gitlab.com/forums/176466-general/suggestions/5653544-check-for-linebreaks-in-ssh-key ).
See merge request !672
2015-07-13 09:33:55 +00:00
Dmitriy Zaporozhets
d93da8bed5
Merge branch 'rs-disable-2fa' into 'master'
...
Add User#disable_two_factor!
This method encapsulates all the logic for disabling 2FA on a specific
User model.
See merge request !961
2015-07-13 08:47:55 +00:00
Dmitriy Zaporozhets
ec19a960ca
Add tests for repository search files
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-07-12 14:32:25 +02:00
Nikita Verkhovin
562d78a65a
Add error message for SSH key linebreaks
2015-07-12 00:18:56 +06:00
Robert Speicher
22724418d3
Add User#disable_two_factor!
...
This method encapsulates all the logic for disabling 2FA on a specific
User model.
2015-07-10 16:18:30 -04: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
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
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
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
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
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
> 
Closes internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2414
See merge request !852
2015-06-23 08:48:22 +00: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
Robert Speicher
dcfce8b198
Use alias_attribute to define User#two_factor_enabled
2015-06-22 21:14:07 -04:00
Robert Speicher
15a05be70d
Fix Style/Blocks cop violations
2015-06-22 16:00:54 -04:00
Robert Speicher
94eff65569
Fix Style/SpaceInsideHashLiteralBraces cop violations
...
These fixes were performed automatically by Rubocop's `-a` flag.
2015-06-22 14:41:00 -04:00
Robert Speicher
56246b70fb
Fix Style/TrailingBlankLines cop violations
2015-06-22 14:38:33 -04:00
Dmitriy Zaporozhets
cf259cdb43
Remove unnecessary whitespace between let and (
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-06-22 14:39:07 +02:00
Robert Speicher and Dmitriy Zaporozhets
0f627f1c60
Fix raise_error without an argument deprecation warnings
2015-06-22 12:13:47 +02:00
Robert Speicher and Dmitriy Zaporozhets
2120e2dd95
Replace remaining references to Note.create_cross_reference_note
2015-06-22 12:13:46 +02:00
Robert Speicher and Dmitriy Zaporozhets
213d1a4768
Use to_reference for issue and merge request mentionable specs
2015-06-22 12:13:46 +02:00
Robert Speicher and Dmitriy Zaporozhets
5a9ede4721
Update mock and stub syntax for specs
2015-06-22 12:13:46 +02:00
Dmitriy Zaporozhets
29b6d465a7
Merge branch 'rs-dev-issue-2355' into 'master'
...
MergeRequest#show performance improvements
This is a first pass on improving the performance of the `MergeRequests#show` page. Notable changes:
- The "Commits" tab is loaded lazily, so the initial page load should be much faster for MRs with many commits.
- Relative timestamps via `timeago` are only initialized once per load instead of `O(n^2)`. This greatly improves frontend rendering times for a large number of commits.
- Refactored `User.find_for_commit` to use a single ARel-generated SQL query instead of the old method which resulted in one query, and could result in up to three.
See merge request !838
2015-06-22 09:48:49 +00:00
Dmitriy Zaporozhets
ea9dda9541
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
2015-06-22 11:26:33 +02:00
Robert Speicher
d3ff8c1a95
Make default value for otp_required_for_login false instead of null
2015-06-20 19:40:48 -04:00
Douwe Maan
c0df5ff126
Merge branch 'snippet_optional_filename' into 'master'
...
Make snippet filename optional.
Fixes #2384 .
See merge request !1866
2015-06-20 10:47:06 +00:00
Nicolas
aecc989154
Make snippet filename optional.
...
Fixes #2384 .
2015-06-20 01:06:57 +02:00
Robert Speicher
516b4c1248
Allow Admin to filter users by 2FA status
2015-06-19 16:35:53 -04:00
Robert Speicher
6c8f0fe906
Add convenience methods to User for getting and setting 2FA status
2015-06-19 14:59:42 -04:00
Robert Speicher
7e31a369f5
Spec and refactor User.find_for_commit
...
Now it executes a single query instead of a possible three at the cost
of some scary-looking ARel calls.
2015-06-17 16:37:11 -04:00
Dmitriy Zaporozhets
0674bf2339
Look for .gitlab-ci.yml only if checkout_sha is present
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-06-15 17:54:42 +02:00
Dmitriy Zaporozhets
7300729190
Merge branch 'rs-dev-issue-2228' into 'master'
...
Allow user to customize default Dashboard page
Renames the "Design" profile page to "Preferences" and adds a field to customize the default Dashboard page:
> 
See merge request !778
2015-06-15 11:29:36 +00:00
Dmitriy Zaporozhets
5c6d83b8e7
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
2015-06-14 12:46:22 +02:00
Dmitriy Zaporozhets
b645f0f432
Merge pull request #9340 from jvanbaarsen/update-noteable
...
Update noteable after a new note is added
2015-06-14 12:46:07 +02:00
Robert Speicher
422236c71e
Change foo.should syntax to expect(foo).to in specs
2015-06-13 18:37:30 -04:00
Robert Speicher
75a40ad5bc
Change foo.should_not syntax to expect(foo).not_to in specs
2015-06-13 18:19:24 -04:00
Robert Speicher
2bc4fd2d04
Add dashboard attribute to User model
2015-06-13 17:59:11 -04: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
themaze75 and Eric 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
Robert Speicher
1c4604bff6
"expect { }.not_to raise_error" no longer takes a specific class
2015-06-10 01:31:27 -04:00
Robert Speicher
47251b85e0
ensure_length_of -> validate_length_of
2015-06-10 01:31:26 -04:00
Robert Speicher
23954b0f77
Correctly remove already-mentioned commits for cross references
...
Fixes #1778
2015-06-08 18:13:14 -04:00
Eric Maziade
84a414fe53
Add session expiration delay configuration through UI application
...
settings
2015-06-05 11:50:37 -04:00
Jeroen van Baarsen
fbdaf0e2a5
Update noteable after a new note is added
...
**What does this do?**
It makes sure that whenever a new note is added to an noteable item, the
updated_at of that item is also updated.
**Why is this needed?**
At this moment when you post a comment on an issue or add a label to an issue,
the updated_at is not changed. Because of this the filtering for least recently
updated is not really useful (since it only takes in account the original text
from the noteable).
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com >
2015-06-05 15:22:55 +02:00