| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This solves an N+1 query problem where we'd run multiple queries when
getting the namespace owners of the displayed projects.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This solves an N+1 query problem where for every project we'd query the
creator separately just to figure out what avatar to display.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Also, don't use limit in subquery, MySQL don't like that.
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
|
|
| |
Dashboard::ProjectsController#index
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`User#starred_projects` doesn't perform any visibility checks. This has
a couple of problems:
1. It assumes a user can always view all of their starred projects in
perpetuity (project not changed to private, access revoked, etc.).
2. It assumes that we'll only ever allow a user to star a project they
can view. This is currently the case, but bugs happen.
Add `User#viewable_starred_projects` to filter the starred projects by
those the user either has explicit access to, or are public or
internal. Then use that in all places where we list the user's starred
projects.
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
|
|
|
|
| |
default""
This reverts commit 617bb1096deb1fb5dea66d04b9bbd7da0dfb57ba.
|
|
|
|
| |
This reverts commit 70d6455284717f938016b1e1b569e0d0dadb11fc.
|
|
|
|
| |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
|
|
|
| |
By instead using a sub-query we save ourselves the overhead of loading
any data into memory only to pass it on to another query.
|
| |
|
|
|
|
|
| |
- Split up SnippetsController into separate dashboard and explore sections.
- Use consistent page titles, header titles and sidebars between dashboard and explore sections when signed in or not.
|
| |
|
|
|
|
| |
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
|
|
|