Dmitriy Zaporozhets
f840903112
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ce-to-ee
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
Conflicts:
app/helpers/tab_helper.rb
app/models/merge_request.rb
app/views/layouts/nav/_project_settings.html.haml
app/views/projects/merge_requests/show/_mr_accept.html.haml
doc/api/groups.md
2015-06-12 11:16:28 +02:00
zenati
b0de6e9ae2
An in_namespace scope is already present
2015-06-09 13:42:01 +02:00
Douwe Maan
844cca4a1e
Add Git hook to validate maximum file size.
2015-06-09 10:23:38 +02:00
Dmitriy Zaporozhets
935fc796d1
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ce-to-ee
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
Conflicts:
VERSION
app/controllers/admin/application_settings_controller.rb
app/controllers/omniauth_callbacks_controller.rb
app/controllers/projects/project_members_controller.rb
app/helpers/application_settings_helper.rb
app/models/user.rb
app/services/files/base_service.rb
app/views/profiles/accounts/show.html.haml
db/schema.rb
doc/install/installation.md
doc/update/6.x-or-7.x-to-7.11.md
doc/workflow/README.md
lib/gitlab/markdown/external_issue_reference_filter.rb
lib/gitlab/reference_extractor.rb
lib/gitlab/upgrader.rb
2015-06-05 11:40:36 +02:00
Robert Speicher
6e5473f930
Remove show actions from Admin and Project DeployKeys
2015-06-03 18:03:04 -04:00
Dmitriy Zaporozhets
61cfd1d273
Wrap group removal into service
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-06-03 14:07:20 +02:00
Robert Speicher
d1bca53bcf
Show "Remove logo" buttons only when Appearance settings are persisted
...
This also adds the CarrierWave cache fields to the form as recommended
by https://github.com/carrierwaveuploader/carrierwave#making-uploads-work-across-form-redisplays
so that uploaded files aren't lost between form submits (i.e., when
there are errors on the form).
2015-05-30 18:23:24 -04:00
Alex Lossent
60225a067d
Allow to configure a URL to show after sign out
2015-05-29 18:20:15 +02:00
Douwe Maan
96d6fdc27c
Add option to disallow users from registering any application to use GitLab as an OAuth provider
2015-05-29 13:29:16 +02:00
Dmitriy Zaporozhets
499154518a
You can not remove user if he/she is an only owner of group
...
To prevent loose of group data you need to transfer or remove group
first before you can remove user
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-05-28 12:00:02 +02:00
Dmitriy Zaporozhets
1af8b1e4f8
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ce-to-ee
...
Conflicts:
app/views/help/index.html.haml
lib/gitlab/git_access.rb
public/500.html
public/502.html
2015-05-15 13:29:58 +03:00
Dmitriy Zaporozhets
f32a045ef4
Merge branch 'version-check' into 'master'
...
Version check
See merge request !1509
2015-05-13 11:17:16 +00:00
Dmitriy Zaporozhets
b2d45bb544
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ce-to-ee
...
Conflicts:
app/controllers/uploads_controller.rb
app/helpers/application_helper.rb
app/models/note.rb
app/services/test_hook_service.rb
db/schema.rb
spec/models/note_spec.rb
2015-05-13 14:10:14 +03:00
bugagazavr
acac788902
Added X-GitLab-Event header for web hooks
2015-05-08 16:49:03 +03:00
Dmitriy Zaporozhets
09b3e354c8
Fix syntax error
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-05-08 16:47:00 +03:00
Dmitriy Zaporozhets
c3cf32e863
Merge branch 'version-check' into gl-version-check
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
Conflicts:
app/controllers/admin/application_settings_controller.rb
app/views/admin/application_settings/_form.html.haml
db/schema.rb
2015-05-08 16:05:00 +03:00
Douwe Maan
2bb2ade50d
Merge branch 'master' into license
...
# Conflicts:
# db/schema.rb
2015-05-05 13:03:33 +02:00
Douwe Maan
5a14f5a49e
Tweak flash messages around license upload/removal.
2015-05-05 12:19:47 +02:00
Douwe Maan
6ff860d1fe
Show nice error when no license was selected.
2015-05-05 10:54:07 +02: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
Douwe Maan
257f8057a2
Minor tweaks.
2015-05-03 15:41:40 +02: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
d1f2b09fad
Allow license to be uploaded and enforce its validity.
2015-05-01 14:52:30 +02:00
Douwe Maan
92fd3ccee0
Add helpers for header title and sidebar, and move setting those from controllers to layouts.
2015-05-01 10:39:16 +02:00
Douwe Maan
26ad250989
Add a page title to every page.
2015-04-30 19:12:15 +02: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
Valery Sizov
bc9ba5237c
Revert "Added X-GitLab-Event header for web hooks"
...
This reverts commit 548f182814 .
2015-04-27 16:29:31 +03:00
Dmitriy Zaporozhets
2e243fc321
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ce-to-ee
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
Conflicts:
README.md
VERSION
app/controllers/projects/services_controller.rb
app/controllers/projects/uploads_controller.rb
app/services/test_hook_service.rb
db/schema.rb
features/steps/admin/settings.rb
lib/gitlab/reference_extractor.rb
spec/models/note_spec.rb
2015-04-27 11:53:31 +03:00
Dmitriy Zaporozhets
2cbdfbfd1e
Merge branch 'master' of github.com:gitlabhq/gitlabhq
2015-04-27 11:38:29 +03:00
Vinnie Okada
bd557e4b64
Add new admin settings
...
Add new global application settings for default project and snippet
visibility levels.
2015-04-26 07:48:19 -06:00
bugagazavr
548f182814
Added X-GitLab-Event header for web hooks
2015-04-25 21:31:52 +03:00
Stan Hu
2f04599751
Fix bug where Slack service channel was not saved in admin template settings.
...
Consolidate allowed parameters in one place to avoid these kinds of bugs in the future.
Closes https://github.com/gitlabhq/gitlabhq/issues/9181
2015-04-24 08:33:24 -07:00
Dmitriy Zaporozhets
9148819323
Rename before_filter to before_action
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-04-24 12:53:33 +03:00
Dmitriy Zaporozhets
f502b293e5
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
spec/helpers/gitlab_markdown_helper_spec.rb
2015-04-24 11:22:54 +03:00
Jeroen van Baarsen
5a4ebfb47a
Fixed the Rails/ActionFilter cop
...
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com >
2015-04-20 15:39:37 +02:00
Dmitriy Zaporozhets
d01d0c02b7
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ce-to-ee
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
Conflicts:
app/controllers/admin/application_settings_controller.rb
app/controllers/groups/group_members_controller.rb
app/controllers/projects/deploy_keys_controller.rb
app/controllers/projects/project_members_controller.rb
app/models/concerns/mentionable.rb
app/models/project.rb
app/models/project_team.rb
app/models/service.rb
app/views/admin/application_settings/_form.html.haml
app/views/admin/groups/show.html.haml
app/views/groups/group_members/_new_group_member.html.haml
config/initializers/1_settings.rb
db/schema.rb
lib/gitlab/reference_extractor.rb
spec/lib/gitlab/reference_extractor_spec.rb
2015-04-15 19:22:57 +03:00
Douwe Maan
2b2bd402dc
Track who created a group or project member.
2015-04-14 12:06:42 +02:00
Dmitriy Zaporozhets
6e88d9335b
Merge branch 'skip-email-reconfirmation' into 'master'
...
Skip email confirmation when set by admin or via LDAP.
Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2203 .
See merge request !494
2015-04-13 13:44:56 +00:00
Douwe Maan
f2af30f195
Skip email confirmation when set by admin or via LDAP.
2015-04-06 13:27:19 +02:00
Douwe Maan
ed097df627
Clean up code.
2015-04-03 12:28:47 +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
Stan Hu
dfd256f29e
Support configurable attachment size via Application Settings
...
Fix bug where error messages from Dropzone would not be displayed on the issues page
Closes #1258
2015-04-02 00:04:08 -07:00
Valery Sizov
ca53814389
git hook refactoring
2015-03-26 13:38:26 +02:00
Valery Sizov
ecbd949424
pre-defined git-hook form
2015-03-26 13:37:29 +02:00
Dmitriy Zaporozhets
3840549566
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq
...
Conflicts:
app/assets/javascripts/dispatcher.js.coffee
features/admin/settings.feature
features/steps/admin/settings.rb
features/steps/user.rb
features/user.feature
lib/gitlab/git_access.rb
2015-03-25 09:16:09 -07:00
Stan Hu
a3daead1b0
Include missing events and fix save functionality in admin service template settings form
...
Closes #1275
2015-03-23 05:51:38 -07:00
Dmitriy Zaporozhets
d3361e6d1b
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ce-to-ee
...
Conflicts:
Gemfile.lock
app/controllers/admin/application_settings_controller.rb
app/controllers/groups/application_controller.rb
app/controllers/groups/group_members_controller.rb
app/controllers/projects/team_members_controller.rb
app/helpers/application_settings_helper.rb
app/helpers/projects_helper.rb
app/helpers/tab_helper.rb
app/models/application_setting.rb
app/models/user.rb
app/views/devise/shared/_signin_box.html.haml
app/views/groups/projects.html.haml
app/views/profiles/keys/_key.html.haml
app/views/projects/team_members/_form.html.haml
app/views/projects/team_members/index.html.haml
config/routes.rb
db/schema.rb
spec/lib/gitlab/ldap/access_spec.rb
2015-03-16 21:25:00 -07:00
Vinnie Okada
2e672c39a0
Fix restricted visibility bugs
...
Check for nil values in the restricted_visibility_level validation
method, and set the restricted visibility request parameter to `[]` when
it's missing from the request.
2015-03-16 13:59:50 -06:00
Dmitriy Zaporozhets
648f38cd98
Merge branch 'fix-restricted-visibility' into 'master'
...
Restricted visibility levels - bug fix and new feature
This allows admin users to override restricted visibility settings when creating and updating projects and snippets, and moves the restricted visibility configuration from gitlab.yml to the web UI. See #1903 .
## Move configuration location
I added a new section to the application settings page for restricted visibility levels. Each level has a checkbox, styled with Bootstrap to look like a toggle button. A checked box means that the level is restricted. I added a glowing text shadow and changed the background color for checked buttons because the default styles made it hard to distinguish between checked and unchecked. This image shows the new section with the "Public" box checked:

## Allow admins to override
To allow admin users to override the restricted visibility levels, I had to remove the `visibility_level` validation from the `Project` class. The model doesn't know about the `current_user`, which should determine whether the restrictions can be overridden. We could use the creator in the validation, but that wouldn't work correctly for projects where a non-admin user is the creator and an admin tries to change the project to a restricted visibility level.
The `Project::UpdateService` and `Project::CreateService` classes already had code to determine whether the current user is allowed to use a given visibility level; now all visibility level validation is done in those classes. Currently, when a non-admin tries to create or update a project using a restricted level, these classes silently set the visibility level to the global default (create) or the project's existing value (update). I changed this behavior to be more like an Active Model validation, where using a restricted level causes the entire request to be rejected.
Project and personal snippets didn't have service classes, and restricted visibility levels weren't being enforced in the model or the controllers. The UI disabled radio buttons for restricted levels, but that wouldn't be difficult to circumvent. I created the `CreateSnippetService` and `UpdateSnippetService` classes to do the same restricted visibility check that the project classes do. And since I was dealing with snippet visibility levels, I updated the API endpoints for project snippets to allow users to set and update the visibility level.
## TODO
* [x] Add more tests for restricted visibility functionality
cc @sytse @dzaporozhets
See merge request !1655
2015-03-16 17:49:46 +00:00