0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-25 13:22:52 +01:00
gitea/cmd
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.go Allow for user specific themes (#5668) 2019-01-09 12:22:57 -05:00
cert.go General refactor of the cmd package (#3328) 2018-01-12 23:16:49 +01:00
cmd.go Disallow empty titles (#5785) 2019-01-21 13:45:32 +02:00
dump.go Add flag to skip repository dumping (#5695) 2019-01-13 16:52:25 -05:00
generate.go Implements generator cli for secrets (#3531) 2018-02-18 20:14:37 +02:00
hook.go fix lfs version check warning log when using ssh protocol (#5501) 2018-12-19 09:17:43 +08:00
keys.go Create AuthorizedKeysCommand (#5236) 2018-11-01 09:41:07 -04:00
migrate.go Add command for migrating database (#4954) 2018-10-30 23:14:42 -04:00
serv.go Fix ssh deploy and user key constraints (#1357) (#5939) 2019-02-03 23:56:53 +00:00
web.go Remove a double slash in the HTTPS redirection when Let's Encrypt is enabled (#5537) 2018-12-12 23:00:24 +02:00
web_graceful.go refactor: show command help message. (#1486) 2017-04-12 15:44:54 +08:00
web_windows.go fix windows build broken by #416 2016-12-31 17:16:02 +08:00