summaryrefslogtreecommitdiff
path: root/app/controllers/groups_controller.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use a specialized class for querying eventsYorick Peterse2017-08-101-3/+3
| | | | | | | | | | | | | | | 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.
* Refactor atom builder by using xml.atom layoutTieu-Philippe KHIM2017-06-121-1/+1
|
* Add a rubocop rule to check if a method 'redirect_to' is used without ↵31840-add-a-rubocop-that-forbids-redirect_to-inside-a-controller-destroy-action-without-an-explicit-statusblackst0ne2017-06-071-2/+2
| | | | explicitly set 'status' in 'destroy' actions of controllers
* Merge branch 'rework-authorizations-performance' into 'master'Douwe Maan2017-05-291-0/+2
|\ | | | | | | | | Rework project authorizations and nested groups for better performance See merge request !10885
| * Hide nested group UI/API support for MySQLYorick Peterse2017-05-171-0/+2
| | | | | | | | | | | | 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.
* | Consistently display last push event widgetDouwe Maan2017-05-251-1/+0
| |
* | Refactor to more robust implementationfix-issue-32506Michael Kozono2017-05-191-0/+8
|/ | | | | | 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 `/…`.
* Merge branch 'tc-fix-private-subgroups-shown' into 'security' Douwe Maan2017-05-101-1/+1
| | | | | Use GroupsFinder to find subgroups the user has access to See merge request !2096
* Redirect from redirect routes to canonical routesMichael Kozono2017-05-051-1/+1
|
* Merge branch 'feature/enforce-2fa-per-group' into 'master' Douwe Maan2017-04-061-1/+3
|\ | | | | | | | | Support 2FA requirement per-group See merge request !8763
| * Support 2FA requirement per-groupMarkus Koller2017-04-061-1/+3
| |
* | ProjectsFinder should handle more optionsJacopo2017-04-061-5/+6
|/ | | | | | | | | | | | | | | | | | | 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.
* use a magic default :global symbol instead of nilhttp://jneen.net/2017-03-091-1/+1
| | | | to make sure we mean the global permissions
* Merge branch 'master' into zj-create-mattermost-teamZ.J. van de Weg2017-03-061-1/+1
|\
| * Fixed filter_projects param still used in group controllerPhil Hughes2017-03-031-1/+1
| |
* | Fix linter errorsZ.J. van de Weg2017-03-031-1/+1
| |
* | Improve UXZ.J. van de Weg2017-03-021-1/+7
| |
* | Finished up mattermost team creationzj-create-mattermost-team-lbLuke "Jared" Bennett2017-02-221-2/+1
| |
* | Transactional mattermost team creationZ.J. van de Weg2017-02-201-1/+0
| | | | | | | | | | | | | | 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.
* | Improve DRYness of viewsZ.J. van de Weg2017-02-161-1/+4
| |
* | Add tests for Mattermost team creationZ.J. van de Weg2017-02-161-0/+1
|/
* Merge branch 'dz-create-nested-groups-via-ui' into 'master' Dmitriy Zaporozhets2017-02-091-11/+22
|\ | | | | | | | | Allow creating nested group via UI See merge request !8786
| * Allow creating nested group via UIdz-create-nested-groups-via-uiDmitriy Zaporozhets2017-02-071-11/+22
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Fix inconsistent naming for services that delete thingsdixpac2017-02-081-1/+1
|/ | | | | | * 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
* resolve deprecation warningsAdam Pahlevi2017-01-311-1/+1
| | | | | | don’t pass AR object, use the ID to avoid depr warning pass in the id instead of AR object to specs for `ProjectDestroyWorker`
* Refactor authorized params in GroupsControllerRémy Coutable2017-01-121-2/+6
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch 'dz-nested-group-misc' into 'master' Dmitriy Zaporozhets2016-12-291-0/+2
|\ | | | | | | | | Miscellaneous improvements to the nested groups feature See merge request !8308
| * Show nested groups tab on group pageDmitriy Zaporozhets2016-12-261-0/+2
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Add more storage statisticsMarkus Koller2016-12-211-1/+1
|/ | | | | | | | | | | | | 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.
* fix reset pathfix/group-path-rename-errorJames Lopez2016-12-211-1/+1
|
* added more specsJames Lopez2016-12-211-0/+2
|
* update controller action to render error in formJames Lopez2016-12-211-4/+1
|
* Fix error 500 renaming group. Also added specs and changelog.James Lopez2016-12-201-1/+4
|
* Syntax fixes and better tests for helper methods. Updated docs.group-specific-lfs-settingsPatricio Cano2016-09-151-5/+5
|
* Added group-specific setting for LFS.Patricio Cano2016-09-151-1/+11
| | | | Groups can enable/disable LFS, but this setting can be overridden at the project level. Admin only
* Fix bug where destroying a namespace would not always destroy projectsStan Hu2016-08-111-2/+2
| | | | | | | | | | | | | | | | | | | There is a race condition in DestroyGroupService now that projects are deleted asynchronously: 1. User attempts to delete group 2. DestroyGroupService iterates through all projects and schedules a Sidekiq job to delete each Project 3. DestroyGroupService destroys the Group, leaving all its projects without a namespace 4. Projects::DestroyService runs later but the can?(current_user, :remove_project) is `false` because the user no longer has permission to destroy projects with no namespace. 5. This leaves the project in pending_delete state with no namespace/group. Projects without a namespace or group also adds another problem: it's not possible to destroy the container registry tags, since container_registry_path_with_namespace is the wrong value. The fix is to destroy the group asynchronously and to run execute directly on Projects::DestroyService. Closes #17893
* Allow to disable user request access to groups/projectsFelipe Artur2016-07-201-1/+1
|
* merge master into issue_3359_3Felipe Artur2016-06-291-4/+4
|\
| * Insert notification settings dropdown into groupsFelipe Artur2016-06-221-12/+19
| |
* | Insert notification settings dropdown into groupsFelipe Artur2016-06-221-12/+19
|/
* Projects on group page should be sorted by last activity instead of ↵fix-group-projects-sortDmitriy Zaporozhets2016-04-141-0/+1
| | | | | | id/created_at Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge branch 'master' into issue_12658Douwe Maan2016-03-211-1/+1
|\ | | | | | | | | | | | | | | | | # 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
| * Use the configured Kaminari "per page" defaultrs-use-kaminari-defaultRobert Speicher2016-03-191-1/+1
| |
* | Fix "Shared projects" tabDouwe Maan2016-03-201-2/+2
| |
* | Tweaks, refactoring, and specsDouwe Maan2016-03-201-14/+5
| |
* | Improve group visibility level featureZeger-Jan van de Weg2016-03-181-11/+0
| |
* | Code fixesFelipe Artur2016-03-171-2/+2
| |
* | Merge 4009-external-users into issue_12658Felipe Artur2016-03-161-3/+7
|\ \ | |/
| * Merge branch 'share-project-ce' into 'master' Dmitriy Zaporozhets2016-03-141-1/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring from EE: Share Project with Group - [x] Models and migrations - [x] Logic, UI - [x] Tests - [x] Documentation - [x] Share with group lock - [x] Api feature - [x] Api docs - [x] Api tests Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> For #12831 cc @DouweM @rspeicher @vsizov See merge request !3186
| | * Add share project from group lockDmitriy Zaporozhets2016-03-111-1/+1
| | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>