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
Douwe Maan
31fc73f0a9
Use project_member instead of team_member.
2015-03-15 13:50:38 +01:00
Vinnie Okada
ad0ca0499a
Merge branch 'master' into fix-restricted-visibility
...
Conflicts:
db/schema.rb
2015-03-14 10:49:11 -06:00
Dmitriy Zaporozhets
f0cbbd70bb
Use same constant for amount of items per page
2015-03-12 15:37:00 -07:00
Dmitriy Zaporozhets
be4d340381
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ce-to-ee
...
Conflicts:
Gemfile.lock
app/controllers/uploads_controller.rb
app/models/application_setting.rb
app/models/project_services/issue_tracker_service.rb
app/views/projects/services/_form.html.haml
db/schema.rb
doc/integration/README.md
features/steps/groups.rb
2015-03-11 18:41:41 -07:00
Dmitriy Zaporozhets
dd24c3d4b9
Improve user block/unblock UI in admin area
2015-03-09 13:02:06 -07:00
Vinnie Okada
cacac147de
Move restricted visibility settings to the UI
...
Add checkboxes to the application settings page for restricted
visibility levels, and remove those settings from gitlab.yml.
2015-03-07 13:11:08 -07:00
Dmitriy Zaporozhets
9156882f89
Improve GitLab EE appearance
...
* Fix bug with redirect to image logo after login
* Use one (light) logo for header
* Improve header logo preview
* Dont require authentication for appearance images
2015-03-03 22:04:25 -08:00
Dmitriy Zaporozhets
c0828d6fcd
Merge branch '7-9-pre' into 'master'
...
Recent changes from CE master
See merge request !325
2015-03-02 22:56:40 +00:00
Marin Jankovski
79a10b15e7
Add help_text to help text, login and static error pages.
2015-02-26 12:23:09 -08:00
Douwe Maan
85af3e82bf
Add option to disable code diffs to EmailOnPush.
...
See #1950
2015-02-25 14:29:49 +01:00
Douwe Maan
e0c186c357
Add option to send EmailsOnPush from committer email if domain matches.
...
See #1809 .
2015-02-25 14:20:35 +01:00
Dmitriy Zaporozhets
976e18bb33
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into 7-9-pre
...
Conflicts:
app/views/groups/show.html.haml
app/views/projects/team_members/index.html.haml
config/routes.rb
2015-02-23 23:56:59 -08:00
Vinnie Okada
9e9ce95d62
Merge branch 'master' into rails-4.1.9
...
Conflicts:
app/views/dashboard/_project.html.haml
app/views/events/event/_common.html.haml
app/views/explore/projects/_project.html.haml
app/views/groups/_projects.html.haml
app/views/projects/_home_panel.html.haml
app/views/projects/_issues_nav.html.haml
app/views/projects/issues/_discussion.html.haml
app/views/projects/issues/_issues.html.haml
app/views/projects/issues/show.html.haml
app/views/projects/merge_requests/_discussion.html.haml
app/views/projects/merge_requests/_show.html.haml
app/views/projects/milestones/index.html.haml
app/views/projects/notes/_edit_form.html.haml
app/views/shared/_issuable_filter.html.haml
2015-02-19 20:53:05 -07:00
Marin Jankovski
7d9ef1124e
Merge remote-tracking branch 'ce/master' into merge_ce
...
Conflicts:
README.md
app/assets/javascripts/project.js.coffee
app/models/concerns/mentionable.rb
app/models/project.rb
app/models/project_services/jira_service.rb
app/models/service.rb
app/models/user.rb
app/services/git_push_service.rb
config/initializers/1_settings.rb
config/routes.rb
db/schema.rb
doc/integration/README.md
doc/integration/external-issue-tracker.md
doc/integration/github.md
spec/controllers/import/github_controller_spec.rb
spec/helpers/merge_requests_helper.rb
spec/lib/gitlab/upgrader_spec.rb
spec/models/note_spec.rb
spec/requests/api/groups_spec.rb
spec/services/git_push_service_spec.rb
2015-02-16 11:50:30 -08:00
Dmitriy Zaporozhets
2ad00f5294
Merge branch 'tweet-new-project'
...
Conflicts:
db/schema.rb
2015-02-15 19:03:10 -08:00
Vinnie Okada
76aad9b76e
Upgrade to Rails 4.1.9
...
Make the following changes to deal with new behavior in Rails 4.1.2:
* Use nested resources to avoid slashes in arguments to path helpers.
2015-02-14 11:09:23 -07:00
Douwe Maan
25e44d0530
Allow users that signed up via OAuth to set their password in order to use Git over HTTP(S).
2015-02-13 14:44:42 +01:00
Douwe Maan
ce08f919bf
Add link to share via twitter to "created project" event.
2015-02-13 12:07:59 +01:00
Marin Jankovski
e8271226b1
Use the service_name.
2015-02-12 10:57:08 -08:00
Marin Jankovski
9f33898f7a
All services can have templates.
2015-02-12 09:19:55 -08:00
Marin Jankovski
6b4ddf2cc1
Add admin services templates.
2015-02-11 17:55:33 -08:00
Dmitriy Zaporozhets
3cd036e315
Merge branch 'notification_email'
...
Conflicts:
db/schema.rb
2015-02-07 18:42:34 -08:00
Douwe Maan
9dbd7e5aec
Allow notification email to be set separately from primary email.
...
Closes #1932 .
2015-02-07 23:19:17 +01:00
Dmitriy Zaporozhets
bbca6a0abd
Refactor sorting in project
2015-02-05 19:15:05 -08:00
Dmitriy Zaporozhets
62ed1c537e
Explicitly define ordering in models using default_scope
2015-02-05 14:20:55 -08:00
Dmitriy Zaporozhets
9b140b22fb
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ce-into-ee
...
Conflicts:
Gemfile.lock
app/helpers/tab_helper.rb
config/routes.rb
db/schema.rb
2015-02-04 18:19:22 -08:00
Marco Wessel
aad6ceaef9
Allow configuring protection of the default branch upon first push
2015-01-25 17:09:10 +01:00
Dmitriy Zaporozhets
2bfd4f4438
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq
...
Conflicts:
VERSION
config/gitlab.yml.example
config/initializers/1_settings.rb
lib/api/entities.rb
lib/api/groups.rb
2015-01-21 17:05:31 -08:00
Dmitriy Zaporozhets
7d5d5e53b1
Merge branch 'doorkeeper_applications_scafold'
2015-01-17 16:17:45 -08:00
Dmitriy Zaporozhets
a81081aa72
Small improvements to CI
2015-01-17 16:17:34 -08:00
Valery Sizov
20028523b5
Application admin scaffold
2015-01-17 15:40:09 -08:00
Dmitriy Zaporozhets
41d7be3ce1
Allow to specify home page for non logged-in users
2015-01-16 16:01:15 -08:00
Dmitriy Zaporozhets
3a9682a3d7
Merge dev.gitlab.org:gitlab/gitlabhq into upstream-ce
...
Conflicts:
VERSION
app/helpers/selects_helper.rb
app/models/project.rb
app/views/devise/sessions/new.html.haml
app/views/groups/_settings_nav.html.haml
app/views/layouts/nav/_admin.html.haml
app/views/profiles/keys/_key.html.haml
app/views/profiles/keys/index.html.haml
app/views/profiles/keys/show.html.haml
app/views/projects/merge_requests/show/_mr_accept.html.haml
config/routes.rb
db/schema.rb
doc/api/projects.md
features/steps/shared/paths.rb
2015-01-08 20:37:35 -08:00
Dmitriy Zaporozhets
d0a50985ec
Create ApplicationSettings if does not exist in runtime
2015-01-08 11:26:16 -08:00
Dmitriy Zaporozhets
57a65ede77
Improve application settings and write tests
2015-01-08 09:53:35 -08:00
Dmitriy Zaporozhets
8589b4e137
Init ApplicationSettings resource with defaults from config file
2015-01-08 00:22:50 -08:00
Marin Jankovski
607ea7c6e5
Share the key table between admin and profile resources.
2014-12-30 11:01:30 +01:00
Marin Jankovski
82829ed49e
Move user key manipulation in admin section to a separate controller.
2014-12-30 10:15:11 +01:00
Drew Blessing
84df1bb467
Custom header logo
2014-12-29 13:42:15 -06:00
Marin Jankovski
492f3a4779
Add user key actions to admins.
2014-12-29 17:07:23 +01:00
Dmitriy Zaporozhets
fd1f54b8ab
Merge branch 'master' into ee-from-ce
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
Conflicts:
Gemfile
app/controllers/application_controller.rb
app/views/admin/groups/_form.html.haml
app/views/groups/edit.html.haml
app/views/groups/show.html.haml
app/views/layouts/nav/_admin.html.haml
app/views/projects/_settings_nav.html.haml
db/schema.rb
doc/install/installation.md
doc/update/6.x-or-7.x-to-7.6.md
2014-12-26 15:05:43 +02:00
Dmitriy Zaporozhets
52a8e5c01a
Set group name from path in admin controller
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2014-12-22 13:55:32 +02:00
Valery Sizov
3fcd75a911
Merge CE master into EE master
...
Conflicts:
Gemfile
VERSION
app/assets/javascripts/project.js.coffee
app/assets/javascripts/users_select.js.coffee
app/controllers/projects/services_controller.rb
app/models/project.rb
app/views/groups/edit.html.haml
features/project/service.feature
features/steps/project/services.rb
spec/models/concerns/mentionable_spec.rb
2014-11-13 17:05:12 +02:00