Commit Graph

169 Commits

Author SHA1 Message Date
Francisco Javier López bf0331dc72 Resolve "DashboardController#activity.json is slow due to SQL" 2017-11-06 16:52:56 +00:00
Bob Van Landuyt 69eba88532 Make sure we render events for projects within a group 2017-10-20 17:02:02 +03:00
Douwe Maan 79e889122b Merge branch 'bvl-group-trees' into 'master'
Show collapsible tree on the project show page

Closes #30343

See merge request gitlab-org/gitlab-ce!14055
2017-10-17 10:03:03 +00:00
Bob Van Landuyt 2c25a7ae34 Nest the group_children_path inside the canonical group path 2017-10-12 11:36:55 +02:00
Vitaliy @blackst0ne Klachkov 64bb19069d Add support for markdown preview to group milestones 2017-10-11 20:03:19 +11:00
Bob Van Landuyt aee5691db3 Don't load unneeded elements in GroupsController#show 2017-10-10 16:54:28 +02:00
Bob Van Landuyt 3fe7f31ac0 Use `GroupFinder` to check if a user can read a group 2017-10-10 14:09:56 +02:00
Bob Van Landuyt 22aa034427 Rename `GroupHierarchy` to `GroupDescendant` 2017-10-04 22:49:41 +02:00
Bob Van Landuyt 31f7756893 `current_user:` as a keyword argument 2017-10-04 22:49:41 +02:00
Bob Van Landuyt e3daa73fbf Setup children in a a method and reuse for both calls 2017-10-04 22:49:41 +02:00
Bob Van Landuyt 8f6dac4991 Allow filtering children for a group
When fetching children for a group with a filter, we will search all
nested groups for results and render them in an expanded tree
2017-10-04 22:49:41 +02:00
Bob Van Landuyt 518216c062 Merge group hierarchies when parents are shared 2017-10-04 22:49:41 +02:00
Bob Van Landuyt 28c440045e Add pagination for children 2017-10-04 22:46:49 +02:00
Bob Van Landuyt 80780018a9 Update `children` route to handle projects and groups 2017-10-04 22:46:49 +02:00
Bob Van Landuyt d33e15574b Add serializer for group children 2017-10-04 22:46:49 +02:00
Bob Van Landuyt 376a8c66c1 Remove the subgroups path on a group 2017-10-04 22:46:49 +02:00
Bob Van Landuyt 2eac1537ad Fetch children using new finder for the `show` of a group. 2017-10-04 22:46:49 +02:00
Ruben Davila 62bb6235c2 Make Members with Owner and Master roles always able to create subgroups 2017-09-07 13:47:58 -05:00
Tiago Botelho 5bc9dedf40 Improves subgroup creation permissions 2017-08-21 15:40:22 +01:00
Yorick Peterse aac1de46c9
Use a specialized class for querying events
This changes various controllers to use the new EventCollection class
for retrieving events. This class uses a JOIN LATERAL query on
PostgreSQL to retrieve queries in a more efficient way, while falling
back to a simpler / less efficient query for MySQL.

The EventCollection class also includes a limit on the number of events
to display to prevent malicious users from cycling through all events,
as doing so could put a lot of pressure on the database.

JOIN LATERAL is only supported on PostgreSQL starting with version 9.3.0
and as such this optimisation is only used when using PostgreSQL 9.3 or
newer.
2017-08-10 17:45:49 +02:00
Tieu-Philippe KHIM 3c1700cde6 Refactor atom builder by using xml.atom layout 2017-06-12 19:21:13 +02:00
blackst0ne a544e46bb0 Add a rubocop rule to check if a method 'redirect_to' is used without explicitly set 'status' in 'destroy' actions of controllers 2017-06-07 09:45:16 +11:00
Douwe Maan 26bcef97d6 Merge branch 'rework-authorizations-performance' into 'master'
Rework project authorizations and nested groups for better performance

See merge request !10885
2017-05-29 15:49:56 +00:00
Douwe Maan e45e540d1d Consistently display last push event widget 2017-05-25 15:21:30 -05:00
Michael Kozono 49697bc8df Refactor to more robust implementation
In order to avoid string manipulation or modify route params (to make them unambiguous for `url_for`), we are accepting a behavior change:

When being redirected to the canonical path for a group, if you requested a group show path starting with `/groups/…` then you’ll now be redirected to the group at root `/…`.
2017-05-19 09:13:27 -07:00
Yorick Peterse 34974258bc
Hide nested group UI/API support for MySQL
This hides/disables some UI elements and API parameters related to
nested groups when MySQL is used, since nested groups are not supported
for MySQL.
2017-05-17 20:53:16 +02:00
Douwe Maan ea4eb46047 Merge branch 'tc-fix-private-subgroups-shown' into 'security'
Use GroupsFinder to find subgroups the user has access to

See merge request !2096
2017-05-10 16:48:18 +02:00
Michael Kozono 7d02bcd2e0 Redirect from redirect routes to canonical routes 2017-05-05 12:11:57 -07:00
Douwe Maan 514dc1a084 Merge branch 'feature/enforce-2fa-per-group' into 'master'
Support 2FA requirement per-group

See merge request !8763
2017-04-06 15:50:16 +00:00
Markus Koller a3430f011f Support 2FA requirement per-group 2017-04-06 10:01:13 +02:00
Jacopo b996a82ff4 ProjectsFinder should handle more options
Extended ProjectFinder in order to handle the following options:
 - current_user - which user use
 - project_ids_relation: int[] - project ids to use
 - params:
   -  trending: boolean
   -  non_public: boolean
   -  starred: boolean
   -  sort: string
   -  visibility_level: int
   -  tags: string[]
   -  personal: boolean
   -  search: string
   -  non_archived: boolean

GroupProjectsFinder now inherits from ProjectsFinder.
Changed the code in order to use the new available options.
2017-04-06 07:11:37 +02:00
http://jneen.net/ 846e581732 use a magic default :global symbol instead of nil
to make sure we mean the global permissions
2017-03-09 11:49:52 -08:00
Z.J. van de Weg 449ecd6c68 Merge branch 'master' into zj-create-mattermost-team 2017-03-06 08:55:35 +01:00
Phil Hughes 8fd5aeee7f Fixed filter_projects param still used in group controller 2017-03-03 16:37:28 +02:00
Z.J. van de Weg 28910ffddf Fix linter errors 2017-03-03 09:01:54 +01:00
Z.J. van de Weg 52c4a7866e Improve UX 2017-03-02 10:21:29 +01:00
Luke "Jared" Bennett 173e27d62a
Finished up mattermost team creation 2017-02-22 10:19:42 +00:00
Z.J. van de Weg 444d71e043 Transactional mattermost team creation
Before this commit, but still on this feature branch, the creation of
mattermost teams where a background job. However, it was decided it was
better that these happened as transaction so feedback could be displayed
to the user.
2017-02-20 13:41:50 +01:00
Z.J. van de Weg 8ddbc43576 Improve DRYness of views 2017-02-16 09:19:28 +01:00
Z.J. van de Weg 1a0e54b32d Add tests for Mattermost team creation 2017-02-16 09:19:02 +01:00
Dmitriy Zaporozhets 059d1ae4c8 Merge branch 'dz-create-nested-groups-via-ui' into 'master'
Allow creating nested group via UI

See merge request !8786
2017-02-09 08:32:40 +00:00
dixpac 0dacf3c169 Fix inconsistent naming for services that delete things
* Changed name of delete_user_service and worker to destroy
* Move and change delete_group_service to Groups::DestroyService
* Rename Notes::DeleteService to Notes::DestroyService
2017-02-08 09:16:43 +01:00
Dmitriy Zaporozhets f39dbf3d3d
Allow creating nested group via UI
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-02-07 15:37:36 +02:00
Adam Pahlevi 538d1bffec resolve deprecation warnings
don’t pass AR object, use the ID to avoid depr warning

pass in the id instead of AR object to specs for `ProjectDestroyWorker`
2017-01-31 06:37:05 +07:00
Rémy Coutable 9e0d3906b9 Refactor authorized params in GroupsController
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-12 17:33:21 -05:00
Dmitriy Zaporozhets 23fc1f666c Merge branch 'dz-nested-group-misc' into 'master'
Miscellaneous improvements to the nested groups feature

See merge request !8308
2016-12-29 18:51:29 +00:00
Dmitriy Zaporozhets 10de4e3bb6
Show nested groups tab on group page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-12-26 14:19:42 +02:00
Markus Koller 3ef4f74b1a
Add more storage statistics
This adds counters for build artifacts and LFS objects, and moves
the preexisting repository_size and commit_count from the projects
table into a new project_statistics table.

The counters are displayed in the administration area for projects
and groups, and also available through the API for admins (on */all)
and normal users (on */owned)

The statistics are updated through ProjectCacheWorker, which can now
do more granular updates with the new :statistics argument.
2016-12-21 16:39:49 +01:00
James Lopez b902784dbf fix reset path 2016-12-21 14:21:18 +01:00
James Lopez 4c3ec579e5 added more specs 2016-12-21 13:29:27 +01:00