Commit Graph
431 Commits
Author SHA1 Message Date
Douglas Barbosa Alexandre 635b65d120 Add method to return the user notification setting for a group, or a project 2016-04-08 18:46:45 -03:00
Douglas Barbosa Alexandre 7afeace354 Merge branch 'master' into decouple-member-notification 2016-04-08 15:48:09 -03:00
Zeger-Jan van de Weg 2c6207135e Allow temp-oauth-email as notification email 2016-03-31 19:59:19 +02:00
Dmitriy Zaporozhets 86418c475b Remove useless Notification model
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Dmitriy Zaporozhets b8f3843790 Update NotificationService to use NotificationSettings instead of membership
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Dmitriy Zaporozhets 359157c097 Introduce NotificationSetting to user interface
* visiting project will create notification setting if missing
* change notification setting per project even without membership
* use notification settings instead of membership on profile page

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Elias Werberich c3a98d8fcc Implementing 'Groups View' and 'TODOs View' as options for dashboard preferences.
Fixes #14585.
2016-03-24 19:59:54 +01:00
Grzegorz Bizon 0115ad66d2 Merge branch 'master' into feature/issue-move
* master: (121 commits)
  Dedupe labels in labels selector in Dashboard pages
  Refactor colors and lists
  Add a safeguard in MergeRequest#compute_diverged_commits_count
  Fix an issue when the target branch of a MR had been deleted
  Add avatar to issue and MR pages header
  Cleanup somce css colors
  Re-group scss variables
  Refactor `Todo#target`
  Fixes issue with filter label missing on labels & milestones
  Rename `Todo#to_reference` to `Todo#target_reference`
  Fixed failing tests
  Updated controller with before_action Fixed other issues based on feedback
  Fixes issue on dashboard issues
  Full labels data in JSON
  Fixed issue with labels dropdown getting wrong labels
  Update CHANGELOG
  Use `Note#for_project_snippet?` to skip notes on project snippet
  Use `Commit#short_id` instead of `Commit.truncate_sha`
  Reuse `for_commit?` on conditional validations
  Update schema info comment on todo related files
  ...

Conflicts:
	app/models/issue.rb
	db/schema.rb
	spec/models/issue_spec.rb
2016-03-19 18:50:15 +01:00
Grzegorz Bizon bcd5806960 Add access-level filter support for projects select
This also refactores ProjectSelect adding some decorator-like functions.
2016-03-17 07:39:16 +01:00
Zeger-Jan van de Weg 59064aeeef Merge branch 'master' into 4009-external-users 2016-03-15 19:16:16 +01:00
Rémy Coutable 1714883107 Revert "Merge branch 'avatar-cropping' into 'master' "
This reverts commit 01160fc061, reversing
changes made to 4bff9daf8b.
2016-03-15 14:55:40 +01:00
Zeger-Jan van de Weg 88f8d3a4d6 Merge branch 'master' into 4009-external-users 2016-03-14 20:08:02 +01:00
Dmitriy Zaporozhets d324bf8434 Merge branch 'share-project-ce' into 'master'
Bring from EE: Share Project with Group

- [x] Models and migrations
- [x] Logic, UI
- [x] Tests
- [x] Documentation
- [x] Share with group lock
- [x] Api feature
- [x] Api docs
- [x] Api tests

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

For #12831 

cc @DouweM @rspeicher @vsizov

See merge request !3186
2016-03-14 16:38:52 +00:00
Zeger-Jan van de Weg 76eeb316df Create an external users tab on Admin user list
Also incorporates the review into this, mainly spec changes.
2016-03-13 19:10:33 +01:00
Zeger-Jan van de Weg 42fcd3881f External Users
The user has the rights of a public user execpt it can never create a project,
 group, or team. Also it cant view internal projects.
2016-03-13 19:08:04 +01:00
Yorick Peterse 3b76b73ab1 Removed User#project_relations
GitLab EE adds an extra relation that selects a "project_id" column
instead of an "id" column, making it very hard for this method to be
re-used in EE. Since using User#authorized_groups in
ProjectsFinder#all_groups apparently has no performance impact we can
just use it and keep everything compatible with EE.
2016-03-12 15:44:48 +01:00
Yorick PeterseandRobert Speicher d7d5937531 Removed arel_table receiver from search methods
We can just use "arel_table" in these cases instead of
"SomeClass.arel_table".
2016-03-11 15:25:23 -05:00
Yorick PeterseandRobert Speicher 9e00a23716 Clean up ProjectsFinder for getting user projects
We don't need the extra layer of nesting of UNION queries here (as
User#authorized_projects already returns a UNION'd query).
2016-03-11 15:25:23 -05:00
Yorick PeterseandRobert Speicher 800aa29695 Use ILIKE/LIKE for searching users 2016-03-11 15:25:21 -05:00
Dmitriy Zaporozhets 068fd5de8a Add finders logic and tests for shared projects feature
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-11 18:55:17 +01:00
Jacob Vosmaer e7df3f51c9 Move method to User 2016-03-10 12:37:14 +01:00
Douwe Maan ad9137a785 Merge branch 'rs-avatar-validation' into 'master'
Only validate avatar cropping values when avatar is present AND changed

Closes #13905

See merge request !3018
2016-03-01 16:03:38 +00:00
Douwe Maan acd9881061 Merge branch 'rs-fix-user-namespace_uniq' into 'master'
Properly check for a pre-existing error in `User#namespace_uniq`

Rails adds an empty error to the Errors object even if you just call
`#[]` on it:

```
[1] pry(main)> u = User.last
[2] pry(main)> u.errors.keys
=> []
[3] pry(main)> u.errors[:username].present?
=> false
[4] pry(main)> u.errors.keys
=> [:username]
```

See merge request !3017
2016-03-01 16:02:57 +00:00
Robert Speicher 58a8d6e9ba Only validate avatar cropping values when avatar is present AND changed
Closes #13905
2016-02-29 17:19:53 -05:00
Robert Speicher 128757a7f9 Properly check for a pre-existing error in User#namespace_uniq
Rails adds an empty error to the Errors object even if you just call
`#[]` on it:

```
[1] pry(main)> u = User.last
[2] pry(main)> u.errors.keys
=> []
[3] pry(main)> u.errors[:username].present?
=> false
[4] pry(main)> u.errors.keys
=> [:username]
```
2016-02-29 17:10:46 -05:00
Robert Speicher 3334c3fc70 Reset otp_grace_period_started_at after disabling 2FA
Prior, if the user enabled 2FA, then disabled it and came back some time
after the grace period expired, they would be forced to enable 2FA
immediately.
2016-02-29 13:56:40 -05:00
Robert Speicher 93e6282657 Add :with_avatar trait to User factory 2016-02-24 13:50:03 -05:00
Alfredo Sumaran af978cd5bc Merge branch 'master' into avatar-cropping 2016-02-23 16:52:43 -05:00
Douglas Barbosa Alexandre 3d52e139b1 Rename Tasks to Todos 2016-02-20 12:39:27 -02:00
Douglas Barbosa Alexandre 41d8f5649e Add task model 2016-02-20 12:10:26 -02:00
Johann Pardanaud 0701b70c9c Minor changes on avatar cropping internals
- Avoid multiple calls to `validates` for the avatar attributes.
- In a cropping process, don't check if the model inherits `User`, check if it responds to `:avatar_crop_size`.
2016-02-18 13:12:39 +01:00
Johann Pardanaud bf6aa15512 Improve avatar cropping internals, based on suggestions made by @rspeicher on !2773 2016-02-17 18:35:16 +01:00
Johann Pardanaud fb6d7df347 Merge branch 'master' into avatar-cropping
Conflicts:
	app/models/user.rb
2016-02-16 19:53:51 +01:00
Johann Pardanaud 6d5808801f Fix #7959: Fix avatar stretching by providing a cropping feature 2016-02-09 22:26:50 +01:00
Rémy Coutable b3635ee46a Re-add EmailValidator to avoid the repetition of format: { with: Devise.email_regexp } 2016-02-09 18:15:35 +01:00
Rémy Coutable b34963bc12 Validate email addresses using Devise.email_regexp
Also:
- Get rid of legacy :strict_mode
- Get rid of custom :email validator
- Add some shared examples to spec emails validation
2016-02-09 18:15:35 +01:00
Douglas Barbosa Alexandre e38a1fc83e Fix typo on User model 2016-02-02 11:25:44 -02:00
Stan HuandDouglas Barbosa Alexandre d20e75a8d8 Support Akismet spam checking for creation of issues via API
Currently any spam detected by Akismet by non-members via API will be logged
in a separate table in the admin page.

Closes #5612
2016-02-02 11:25:44 -02:00
Douwe Maan 98e1a5b634 Allow LDAP users to change their email if it was not set by the LDAP server 2016-01-19 16:25:38 +01:00
Gabriel Mazetto dd6fc01ff8 fixed LDAP activation on login to use new ldap_blocked state 2016-01-14 03:31:27 -02:00
Gabriel Mazetto ec67e9be1d Repair ldap_blocked state when no ldap identity exist anymore 2016-01-08 16:26:04 -02:00
Gabriel Mazetto bc7ef8e5b7 Add ldap_blocked as new state to users state machine 2016-01-08 16:26:04 -02:00
Stan Hu 79c0e7212a Annotate models 2016-01-06 13:09:55 +00:00
Robert Speicher fd178c1e7d Prevent duplicate "username has already been taken" validation message
Closes #201 - two-year-old bug, woo! 💥 🎉
2016-01-02 20:03:28 -05:00
Robert Speicher 9570495e75 Merge branch 'add_email_unlock' into 'master'
Allow account unlock via email

We see a lot of users get confused about what it means when your account gets
locked. Many try to reset their password and are still faced with a lockout.
With this change, users receive an email that allows them to unlock their
account immediately. The previous behavior where the account is auto-unlocked
after a time also still works.

See merge request !2049
2015-12-21 17:53:20 +00:00
Gabriel Mazetto b5291f9599 Fixed Rubocop offenses 2015-12-15 00:53:52 -02:00
Drew Blessing be41d84fb0 Allow account unlock via email 2015-12-14 15:35:02 -06:00
Grzegorz Bizon 2ec93abed7 Merge branch 'master' into ci/persist-registration-token
* master: (66 commits)
  Fix runners admin view
  Fix migrations
  Rename mention of gitlab-git-http-server to gitlab-workhorse
  Bump Redis requirement to 2.8 for Sidekiq 4 requirements
  Fix wording on runner setup page
  add details on how to change saml button label
  Fix tests
  Move awards back to gray panel and few improvements to sidebar
  Few UI improvements to new sidebar implementation
  Fix tests for new issuable sidebar
  Update changelog
  Implement new sidebar for merge request page
  Make edit link on issuable sidebar works
  Redesign issue page for new sidebar
  Move awards css to separate file
  Implement issuable sidebar partial
  Update CHANGELOG
  Clarify cache behavior
  Run builds from projects with enabled CI
  Use Gitlab::Git instead of Ci::Git
  ...

Conflicts:
	db/schema.rb
2015-12-14 12:26:40 +01:00
Kamil Trzcinski 64bfd9d71a Remove ci_ prefix from all ci related things 2015-12-11 18:02:09 +01:00
Kamil Trzcinski e80e3f5372 Migrate CI::Project to Project 2015-12-11 18:02:09 +01:00