| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Subscription to issue/mr
Fixes #1911 and #1909
![joxi_screenshot_1426601822159](https://dev.gitlab.org/gitlab/gitlabhq/uploads/53021bc5783271322ab2dfba7598eaa3/joxi_screenshot_1426601822159.png)
![joxi_screenshot_1426601836423](https://dev.gitlab.org/gitlab/gitlabhq/uploads/244ff360fbd6f30980f8dad699400814/joxi_screenshot_1426601836423.png)
See merge request !1702
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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:
![restricted_visibility_settings](https://dev.gitlab.org/Okada/gitlabhq/uploads/629562e4313f89b795e81c3bb0f95893/restricted_visibility_settings.png)
## 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
|
| |\ \
| | |/
| | |
| | |
| | | |
Conflicts:
db/schema.rb
|
| | |
| | |
| | |
| | |
| | | |
Add Rspec tests for the new UpdateSnippetService and
CreateSnippetService classes.
|
| | |
| | |
| | |
| | |
| | | |
Allow admins to use restricted visibility levels when creating or
updating projects.
|
| |/
|/| |
|
|/
|
|
|
|
|
| |
This commit disables process_commit_messages()
for the initial push to the default branch.
This fixes the mass SQL statements (~500000) that were executed during
the initial push of the linux kernel for example.
|
|\
| |
| |
| |
| |
| |
| |
| | |
Send notifications and leave system comments when bulk updating issues.
Resolves https://dev.gitlab.org/gitlab/gitlabhq/issues/1885.
See merge request !1646
|
| | |
|
|/
|
|
| |
branch.
|
|
|
|
|
|
|
|
|
|
|
| |
1) Adds a DB migration for all services to toggle on push, issue, and merge events.
2) Upon an issue or merge request event, fire service hooks.
3) Slack service supports custom messages for each of these events. Other services
not supported at the moment.
4) Label merge request hooks with their corresponding actions.
|
|
|
|
|
|
| |
Fixes #867
[ci skip]
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
# 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
|
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
This commit generalizes the image upload via drag and drop so it supports all files.
It also adds access control for these files.
|
|
|
|
| |
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
configure-protection
Conflicts:
CHANGELOG
db/schema.rb
|
| |\
| | |
| | | |
Added support for firing system hooks on group create/destroy and adding...
|
| | |
| | |
| | |
| | |
| | |
| | | |
adding/removing users to group.
Added tests and updated docs. Also adding 'user_id' field in the hooks for adding/removing user from team.
|
| | | |
|
| | | |
|
| |/
| |
| |
| | |
Also refactor NotificationService a bit
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
| |
It does disable all emails expect system one or when you was @mentioned
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|\
| |
| |
| | |
https://gitlab.com/bkaindl/gitlab-ce into bkaindl/gitlab-ce-prepare-fork-to-given-namespace
|
| |
| |
| |
| |
| |
| |
| | |
Remove overload of BaseService.initialize, so initialize gains params,
which is used to pass the namespace (like e.g. in TransferService).
The namespace is checked for permission to create projects in it.
|
| |
| |
| |
| | |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
| | |
|
|/
|
|
|
|
|
|
| |
- replace creation of group2 with the use of group without add_owner(user)
- fold TransferService calls into new test function transfer_project
- remove currently not used (and not working) gitlab_shell stub
(will submit testcase simulating failure in gitlab_shell separately)
- add checks against not be_nil (result.should be_false passes even if nil)
|
| |
|
|
|
|
| |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
|
|
| |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
|
|
| |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
|
|
|
|
| |
Add system hook for ssh key create and destroy
Update and fix documentation
Update tests
|
| |
|
|
|
|
| |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
|
|
| |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
|
|
| |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
| |
|
| |
|
|\
| |
| |
| | |
Group milestones
|