Commit graph

8 commits

Author SHA1 Message Date
Jarka Kadlecova
3750766f42 Escape route path for LIKE queries 2017-03-21 17:04:12 +01:00
Robert Speicher
9bf9e6eb38 Handle Route#name being nil after an update
It was possible for the `routes.name` field to be `NULL`, causing
`name_was` to be `nil` after a rename, resulting a bad first argument to
`sub` when attempting to rename descendants. This change adds a
condition to make sure `name_was` is present before attempting the
descendant update.
2017-03-20 19:17:14 -04:00
Dmitriy Zaporozhets
4d40c3c30a
Fix route rename descendants if route.name is blank
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-02-08 23:36:23 +02:00
Dmitriy Zaporozhets
2989192d1a
Store group and project full name and full path in routes table
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-02-08 19:14:29 +02:00
Dmitriy Zaporozhets
52c5f9c97f
Add User#nested_groups and User#nested_projects methods
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-01-25 13:43:15 +02:00
Dmitriy Zaporozhets
51c4b20c48 Refactor Namespace code related to nested groups
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-01-13 10:05:02 -05:00
Dmitriy Zaporozhets
95e0fac59a
Fix Route#rename_children behavior
Given group `gitlab` and `gitlab-org` exists. When rename `gitlab` it
will rename `gitlab-org` group route too. This commit fixes it

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-12-19 22:36:47 +02:00
Dmitriy Zaporozhets
83232be0e1
Add nested groups support on data level
* add parent_id field to namespaces table to store relation with nested groups
* create routes table to keep information about full path of every group and project
* project/group lookup by full path from routes table

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-12-08 11:47:16 +02:00