Robert Speicher
b88da58cb6
Add reference_pattern to Referable models
2015-05-26 15:48:32 -04:00
Robert Speicher
c0faf91ff2
Add to_reference for models that support references
...
Now there is a single source of information for which attribute a model
uses to be referenced, and its special character.
2015-05-26 15:48:30 -04:00
Hannes Rosenögger
1dd0caf4d9
Merge branch 'fix-avatar-removal' into 'master'
...
Fix bug where avatar filenames were not actually deleted from the database during removal
This would result in a 404 error in certain views.
The `save` call was being rolled back due to an error in the validation step.
Relax the validation step so that this works.
Closes #1570
See merge request !620
2015-05-12 14:46:58 +00:00
Dmitriy Zaporozhets
4a373be861
Merge branch '2fa' into 'master'
...
Two-factor authentication
Implement's Two-factor authentication using tokens.
- [X] Authentication logic
- [X] Enable/disable 2FA feature
- [x] Make 2-step login process if 2FA enabled
- [x] Backup codes
- [x] Backup code removed after being used
- [x] Check backup codes for mysql db (mention mysql limitation if applied)
- [x] Add tests
- [x] Test if https://github.com/tinfoil/devise-two-factor#disabling-automatic-login-after-password-resets applies, and address if so
- [x] Wait for fixed version of `attr_encrypted` or fork and use forked version - https://github.com/attr-encrypted/attr_encrypted/issues/155
Fixes http://feedback.gitlab.com/forums/176466-general/suggestions/4516817-implement-two-factor-authentication-2fa
See merge request !474
2015-05-12 09:41:27 +00:00
Robert Speicher
19b897e998
Remove extra devise call that got added by accident
2015-05-10 19:13:47 -04:00
Robert Speicher
11989d62d0
Remove unnecessary User#login accessor override
2015-05-09 17:39:16 -04:00
Robert Speicher
c845347b23
Generate 10 2FA backup codes instead of the default of 5
2015-05-09 17:32:48 -04:00
Robert Speicher
b050bb5bad
Fix 2FA backup code removal
2015-05-09 17:32:48 -04:00
Robert Speicher
661d09a22b
Re-annotate User model
2015-05-09 17:32:24 -04:00
Robert Speicher
66bc758e2b
Update User model for two-factor auth
2015-05-09 17:32:05 -04:00
Dmitriy Zaporozhets and Robert Speicher
50a2a229e7
Fix rubocop complain
2015-05-09 17:31:10 -04:00
Dmitriy Zaporozhets and Robert Speicher
7302395142
Init 2 factor authentication for user model
2015-05-09 17:31:07 -04:00
Maran
a0fd2eb568
Don't show duplicate deploy keys. Fixes #1516
2015-05-08 21:32:03 +02:00
Stan Hu
bf4b438459
Fix bug where avatar filenames were not actually deleted from the database during removal.
...
This would result in a 404 error in certain views.
The `save` call was being rolled back due to an error in the validation step.
Relax the validation step so that this works.
Closes #1570
2015-05-07 10:00:35 -07:00
Stan Hu
a3157626f1
Re-annotate models
2015-05-03 13:38:27 -07: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
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
Douwe Maan
d386bb7808
Allow primary email to be set to an email that you've already added.
2015-04-30 16:17:03 +02:00
Senorsen
7b28218f96
Allow user to choose which email to be public
...
This commit allows user to show one of their emails in profile page,
or don't show email in this page.
2015-04-14 19:42:48 +08:00
Dmitriy Zaporozhets
9c14ed0689
Merge branch 'public-deploy-keys' into 'master'
...
Allow admin to create public deploy keys that are accessible to any project.
Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/1774 .
Project settings:

The "Public deploy keys" section is only shown when there are any. If there are public deploy keys but no project deploy keys, only public deploy keys are shown. If there are no public deploy keys and no project deploy keys, the current "Deploy keys from projects you have access to will be displayed here" placeholder is shown.
The list of projects below the public key has been changed to only show projects the user has access to.
"Public deploy key" seems to be repeated on the left, but the first is just the title. The label is always visible for public deploy keys.
Admin index:

Admin detail page:

Projects using the deploy key are listed on the left and can be disabled easily.
See merge request !469
2015-04-13 09:08:13 +00:00
Douwe Maan
6cf7dd625a
Fix persistent XSS vulnerability around profile website URLs.
2015-04-10 18:30:49 +02:00
Douwe Maan
edc4a56d26
Allow admin to create public deploy keys that are accessible to any project.
2015-04-03 12:23:20 +02:00
Douwe Maan
dfe0f9eedf
Use more specific regexes.
2015-03-27 11:09:29 +01:00
Douwe Maan
3f7531d6f2
Move User.cleanup_username to Namespace.cleanup_path.
2015-03-27 11:09:29 +01:00
Douwe Maan
e3fb9b1609
Clean up subscriptions when user is deleted.
2015-03-24 15:44:17 +01:00
Dmitriy Zaporozhets
43afe46bbd
Refactor contributions events and write tests for calendar
2015-03-22 13:55:00 -07:00
Douwe Maan
31fc73f0a9
Use project_member instead of team_member.
2015-03-15 13:50:38 +01:00
Dmitriy Zaporozhets
de629b4835
Blocking user does not remove him/her from project/groups but show blocked label
2015-03-09 19:02:30 -07:00
Dmitriy Zaporozhets
66c61f023b
Re-annotate models
2015-03-04 14:14:00 -08:00
Douwe Maan
804a2488cf
Fix and test User#contributed_projects_ids.
2015-02-27 10:49:47 +01:00
Dmitriy Zaporozhets
0d884ff2b1
Merge branch 'extend_markdown_upload' into 'master'
...
Generalizes image upload in drag and drop in markdown to all files
From https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/265 by Hannes Rosenögger.
- [x] Rebase on master when !1553 is merged in
See merge request !1530
2015-02-25 23:36:03 +00:00
Dmitriy Zaporozhets
a52529f9b6
Merge branch 'bitbucket-import'
...
Conflicts:
app/views/import/gitorious/status.html.haml
db/schema.rb
2015-02-25 09:21:45 -08:00
Douwe Maan
5f7a3e1bbd
Merge branch 'master' into extend_markdown_upload
...
# Conflicts:
# app/controllers/files_controller.rb
2015-02-25 11:59:25 +01:00
Dmitriy Zaporozhets
2cedeb4856
Merge branch 'contributed-projects' into 'master'
...
Improve contributed project and commit calendar selection.
Fixes #2024 .
See merge request !1554
2015-02-24 21:07:05 +00:00
Douwe Maan
5179c5830b
Contributed projects either have user pushes or created MRs.
2015-02-24 18:13:11 +01:00
Douwe Maan
ad6d623234
Add Bitbucket importer.
2015-02-24 15:07:24 +01:00
Douwe Maan
0283fff591
Merge branch 'master' into extend_markdown_upload
...
# Conflicts:
# app/views/projects/issues/_form.html.haml
# app/views/projects/merge_requests/_form.html.haml
# app/views/projects/merge_requests/_new_submit.html.haml
# app/views/projects/milestones/_form.html.haml
# app/views/projects/notes/_form.html.haml
# app/views/projects/wikis/_form.html.haml
# config/routes.rb
# spec/controllers/projects_controller_spec.rb
2015-02-24 14:54:39 +01:00
Douwe Maan and Marin Jankovski
c9829146f8
LDAP users don't need to set a password to Git over HTTP.
2015-02-23 20:04:18 -08:00
Douwe Maan
218283b368
Merge branch 'extend_markdown_upload' into generic-uploads
...
# Conflicts:
# app/controllers/files_controller.rb
# app/controllers/projects/uploads_controller.rb
# app/uploaders/attachment_uploader.rb
2015-02-20 15:37:37 +01:00
Douwe Maan
4ef6ffaad3
Split up AttachmentUploader.
2015-02-20 15:19:50 +01:00
Dmitriy Zaporozhets
9470675b4e
Merge branch 'projects-limit-default' into 'master'
...
Correctly set default projects limit for new users.
See #2014 .
Note that the projects limit still isn't retroactively applied to existing users (probably as intended)
See merge request !1547
2015-02-19 20:48:49 +00:00
Douwe Maan
1d6050104c
Correctly set default projects limit for new users.
2015-02-19 19:26:57 +01:00
Dmitriy Zaporozhets
8184a65644
Revert "Fix broken access control and refactor avatar upload"
...
This reverts commit 7d5f86f6cb .
2015-02-19 08:57:35 -08:00
Dmitriy Zaporozhets
716544085c
Get contributed projects for last year only
2015-02-18 15:16:13 -08:00
Dmitriy Zaporozhets
138aa81e60
Get contributed projects only if push event exists
2015-02-18 14:20:26 -08:00
Dmitriy Zaporozhets
2f0a764d31
Fix user page performance and authorization
2015-02-18 13:28:24 -08:00
Hannes Rosenögger and Douwe Maan
7d5f86f6cb
Fix broken access control and refactor avatar upload
...
This commit moves the note folder from
/public/uploads/note
to
/uploads/note
and changes the uploader accordingly.
Now it's no longer possible to avoid the access control by modifing the url.
The Avatar upload has been refactored to use an own uploader as well
to cleanly seperate the two upload types.
2015-02-16 20:10:15 +01:00
Dmitriy Zaporozhets
ec5622b1a4
Merge branch 'user-account-created-email' into 'master'
...
Only send "Account was created for you" email when created by admin.
See #1985
cc @sytse
See merge request !1517
2015-02-16 03:08:48 +00:00
Dmitriy Zaporozhets
f91767db3d
Merge branch 'oauth-password-http' into 'master'
...
Allow users that signed up via OAuth to set their password in order to use Git over HTTP(S)
See #1982 .

There's a similar tooltip for SSH: "Add an SSH key to your profile to pull or push via SSH". These are always shown on-hover, even if the persistent flash above was hidden.
cc @sytse
See merge request !1512
2015-02-13 18:12:05 +00:00
Douwe Maan
4a62a0f01a
Only send "Account was created for you" email when created by admin.
2015-02-13 15:30:54 +01:00