Commit Graph
151 Commits
Author SHA1 Message Date
Rémy Coutable 4f07c0a107 Ensure project snippets have their own access level 2016-03-25 18:51:17 +01:00
Rémy Coutable f4bdefdff1 Ensure private project snippets are not viewable by unauthorized people
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/14607.
2016-03-25 12:33:42 +01:00
Douwe Maan 31266c5be4 Address feedback 2016-03-22 00:09:20 +01:00
Douwe Maan ae7b2ef62c Merge branch 'master' into issue_12658
# Conflicts:
#	app/models/issue.rb
#	app/views/projects/_home_panel.html.haml
#	app/views/shared/projects/_project.html.haml
#	db/schema.rb
#	spec/models/project_spec.rb
2016-03-21 23:22:21 +01:00
Zeger-Jan van de Weg 3b088fc5b5 Minor improvements on IssuableActions 2016-03-21 16:59:35 +01:00
Douwe Maan 8db1292139 Tweaks, refactoring, and specs 2016-03-20 21:04:07 +01:00
Douwe Maan 2eb19ea3ea Merge branch 'master' into issue_12658 2016-03-20 14:57:25 +01:00
Zeger-Jan van de Weg 7342a4566c Dry destroy action on issuables 2016-03-19 21:24:05 +01:00
Zeger-Jan van de WegandFelipe Artur b959ae553b Improve group visibility level feature 2016-03-18 16:58:04 -03:00
Douglas Barbosa Alexandre 34ee75379c Restrict access to confidential issues 2016-03-17 20:55:38 -03:00
Felipe Artur 0a7f716119 Code fixes 2016-03-17 19:42:46 -03:00
Felipe Artur a18ac62756 Block internal groups/projects visibility to external users 2016-03-16 21:23:59 -03:00
Felipe Artur 44c127447b Merge 4009-external-users into issue_12658 2016-03-16 20:16:42 -03:00
Felipe Artur ec20fdf366 Code improvements and add Create group service 2016-03-16 19:44:33 -03: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
Felipe Artur 96fc1d9092 Add security specs 2016-03-10 10:38:36 -03:00
Felipe Artur c3e70280df Prevent projects to have higher visibility than groups
Prevent Groups to have smaller visibility than projects
Add default_group_visibility_level to configuration
Code improvements
2016-03-10 10:38:36 -03:00
Felipe Artur 5551ccd720 Code improvements 2016-03-10 10:38:36 -03:00
Felipe Artur f2a9ee258e Add permission level to groups 2016-03-10 10:38:36 -03:00
Yorick Peterse 53719ecb80 Handle permissions for ExternalIssue instances
This fixes the remainder of the GitPushService specs.
2016-03-09 17:10:43 +01:00
Robert Speicher e6204eb3cb Move update_merge_request ability to Developer
Closes #13663
2016-03-04 15:53:25 -05:00
Kamil Trzcinski a7c441aa17 Use delete instead of assignment operator when filtering build abilities 2016-02-04 16:32:41 +01:00
Kamil Trzcinski c64c106091 Update ability model after comments 2016-02-04 14:43:52 +01:00
Kamil Trzcinski b4c36130cc Rename allow_guest_to_access_builds to public_builds 2016-02-04 12:57:46 +01:00
Kamil Trzcinski 5f7be11aa6 Simplify abilities 2016-02-04 11:09:42 +01:00
Kamil Trzcinski c3d897a9a3 Properly handle commit status permissions (for a build) 2016-02-03 13:33:47 +01:00
Kamil Trzcinski e80c79e3ad Fix build errors 2016-02-03 12:41:16 +01:00
Kamil Trzcinski 627909c2a4 Add CI setting: allow_guest_to_access_builds
Add the `read_build` ability if user is anonymous or guest and allow_guest_to_access_builds is enabled.
2016-02-02 17:59:37 +01:00
Kamil Trzcinski 055afab5c7 Make the CI permission model simpler
This MR simplifies CI permission model:
- read_build: allows to read a list of builds, artifacts and trace
- update_build: allows to cancel and retry builds
- create_build: allows to create builds from gitlab-ci.yml (not yet implemented)
- admin_build: allows to manage triggers, runners and variables
- read_commit_status: allows to read a list of commit statuses (including the overall of builds)
- create_commit_status: allows to create a new commit status using API

Remove all extra methods to manage permission.
Made all controllers to use explicitly the new permissions.
2016-02-02 09:18:08 +01:00
Andrew JohnsonandGrzegorz Bizon f66f9e95bf Give reporters the ability to download artifacts.
Also fix a few places where page_404 should be render_404.
2016-01-15 12:01:19 +01:00
Grzegorz Bizon 487b0a026f Improvements, readability for artifacts browser 2016-01-14 12:48:16 +01:00
Valery Sizov 8b18449125 remove public field from namespace and refactoring 2016-01-04 16:00:29 +02:00
Jason Lee 03a40a7ee1 Avoid allocations in Ability class.
It won't change anything after they are first invoke, so add method cache to avoid allocations and avoid GC.

Benchmarks:

```
Calculating -------------------------------------
project_guest_rules without method cache
                        79.352k i/100ms
project_guest_rules with method cache
                        93.634k i/100ms
-------------------------------------------------
project_guest_rules without method cache
                          2.865M (±32.5%) i/s -     11.982M
project_guest_rules with method cache
                          4.419M (± 7.4%) i/s -     22.004M

Comparison:
project_guest_rules with method cache:  4418908.0 i/s
project_guest_rules without method cache:  2864514.0 i/s - 1.54x slower

Calculating -------------------------------------
project_report_rules without method cache
                        53.126k i/100ms
project_report_rules with method cache
                        97.473k i/100ms
-------------------------------------------------
project_report_rules without method cache
                          1.093M (±36.5%) i/s -      4.675M
project_report_rules with method cache
                          4.420M (± 7.2%) i/s -     22.029M
Comparison:
project_report_rules with method cache:  4420054.3 i/s
project_report_rules without method cache:  1092509.6 i/s - 4.05x slower
```

https://gist.github.com/huacnlee/b04788ae6df42fe769e4
2015-12-16 11:51:37 +08:00
Douglas Barbosa Alexandre 67cc6b0642 Signed in admin should be able to add/remove himself to a project 2015-12-01 20:53:43 -02:00
Douglas Barbosa Alexandre 9ab7bdf773 Signed in admin should be able to add/remove himself to a group 2015-12-01 20:53:43 -02:00
Robert Speicher 56476f1847 Merge branch 'dbalexandre/gitlab-ce-fix-personal-snippet-access-workflow' into 'master'
Improve personal snippet access workflow.

Replaces !1709

Fixes #3258

See merge request !1817
2015-11-19 17:22:20 +00:00
Robert Speicher 08dc38223e Rename not_auth_* ability methods to anonymous_* 2015-11-17 15:00:14 -05:00
Douwe Maan 756d61562b Minor refactoring 2015-11-17 16:24:02 +01:00
Douwe Maan 16438ad205 Merge branch 'master' into dbalexandre/gitlab-ce-fix-personal-snippet-access-workflow 2015-11-17 16:19:16 +01:00
Douwe Maan ecb83afabc Refactor ability changes 2015-11-17 15:49:37 +01:00
Douwe Maan e849b51cae Merge branch 'master' into james11/gitlab-ce-removable-group-owner 2015-11-17 15:40:54 +01:00
Dmitriy Zaporozhets 929ab909c8 Group masters should be able to create/close milestones
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-16 16:14:19 +01:00
James Lopez 77dd561796 fixing rubocop indents 2015-11-12 08:43:30 +00:00
James Lopez c6a0f109cd refactored code as projects only have one owner. Kept some refactoring in place (has_owners concern) 2015-11-11 15:42:27 +00:00
Kamil Trzcinski d0e3e823a2 Implement Build Artifacts
- Offloads uploading to GitLab Workhorse
- Use /authorize request for fast uploading
- Added backup recipes for artifacts
- Support download acceleration using X-Sendfile
2015-11-10 12:51:50 +01:00
James Lopez 1b14bc5957 refactored permissions and added update_project_member ability logic. Also refactored owner methods to a concern. 2015-11-03 11:11:56 +00:00
Douglas Barbosa Alexandre 091979bd1b Fix ability name for public or internal personal snippets 2015-11-02 14:04:45 -02:00
Douglas Barbosa Alexandre c8fe421512 Improve personal snippet access workflow. Fixes #3258 2015-10-29 18:42:29 -02:00
Han Loong Liauw 02e8beaa0b Merge branch 'master' into remove-forks-from-projects-settings 2015-10-17 09:32:31 +11:00
Kamil Trzcinski a957eca6f3 Added builds view 2015-10-14 17:28:38 +02:00