gitea/routers
zeripath 01c10a951b
Fix ssh deploy and user key constraints (#1357) (#5939)
1. A key can either be an ssh user key or a deploy key. It cannot be both.
2. If a key is a user key - it can only be associated with one user.
3. If a key is a deploy key - it can be used in multiple repositories and the permissions it has on those repositories can be different.
4. If a repository is deleted, its deploy keys must be deleted too.

We currently don't enforce any of this and multiple repositories access with different permissions doesn't work at all. This PR enforces the following constraints:

- [x] You should not be able to add the same user key as another user
- [x] You should not be able to add a ssh user key which is being used as a deploy key
- [x] You should not be able to add a ssh deploy key which is being used as a user key
- [x] If you add an ssh deploy key to another repository you should be able to use it in different modes without losing the ability to use it in the other mode.
- [x] If you delete a repository you must delete all its deploy keys.

Fix #1357
2019-02-03 23:56:53 +00:00
..
admin Support reverse proxy providing email (#5554) 2018-12-18 12:05:48 -05:00
api/v1 Fix ssh deploy and user key constraints (#1357) (#5939) 2019-02-03 23:56:53 +00:00
dev Make time diff translatable (#2057) 2017-06-28 13:43:28 +08:00
org Improve team members and repositories settings UI (#5457) 2018-12-09 08:42:11 +02:00
private Fix ssh deploy and user key constraints (#1357) (#5939) 2019-02-03 23:56:53 +00:00
repo Fix ssh deploy and user key constraints (#1357) (#5939) 2019-02-03 23:56:53 +00:00
routes Disable redirect for i18n (#5910) 2019-01-31 09:38:20 -05:00
user if repo does not exist, show a 404 not a 500 (#5900) 2019-01-30 11:13:39 -05:00
utils Slack webhook channel name cannot be empty or just contain an hashtag (#4786) 2018-09-10 10:31:08 -04:00
home.go feat(repo): support search repository by topic name (#4505) 2018-09-13 10:33:48 +08:00
init.go Ensure error is logged on db reconnection attempts (#5780) 2019-01-20 09:30:37 +00:00
install.go Remove traces of embedded TiDB (#4906) 2018-09-11 10:42:40 -04:00
metrics.go Prometheus endpoint (#5256) 2018-11-04 22:20:00 -05:00
swagger_json.go Swagger.v1.json template (#3572) 2018-07-28 03:19:01 +03:00