forgejo-federation/modules
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
..
auth Request for public keys only if LDAP attribute is set (#5816) 2019-01-24 01:25:33 +02:00
avatar Use assert in legacy unit tests (#867) 2017-02-08 14:29:07 +08:00
base Serve audio files using HTML5 audio tag (#5221) 2018-10-30 10:17:26 +08:00
cache Fix memcache support when value is returned as string always (#2924) 2017-11-16 15:06:34 +08:00
context Provide better panic handling (#5902) 2019-01-30 17:00:00 -05:00
cron Add branch overiew page (#2108) 2017-10-26 08:49:16 +08:00
generate Implements generator cli for secrets (#3531) 2018-02-18 20:14:37 +02:00
gzip Pooled and buffered gzip implementation (#5722) 2019-01-23 10:56:51 +02:00
highlight No highlighting for .txt files (#1922) 2017-06-09 19:39:16 -05:00
httplib Add sensitive headers (#3429) 2018-01-31 00:09:16 +02:00
indexer fix indexer reindex bug when gitea restart (#5563) 2018-12-19 16:37:48 +08:00
lfs Fix bug when read public repo lfs file (#5912) 2019-01-31 13:36:57 +00:00
log Remove maxlines option for file logger (#5282) 2018-11-07 06:48:53 +02:00
mailer Make log mailer for testing (#5893) 2019-02-02 21:06:52 -05:00
markup Recover panic in orgmode.Render if bad orgfile (#4982) (#5903) 2019-01-30 17:17:43 -05:00
metrics Prometheus endpoint (#5256) 2018-11-04 22:20:00 -05:00
minwinsvc Fix Git hooks not being executed on Windows when running as a service (#1149) 2017-03-09 09:27:43 +08:00
notification Refactor notification for indexer (#5111) 2019-01-17 22:23:22 +08:00
options Fix typos in models/ and modules/ (#1248) 2017-03-15 08:52:01 +08:00
pprof cmd/serve: pprof cpu and memory profile dumps to disk (#4560) 2018-08-07 14:49:18 -04:00
private Fix ssh deploy and user key constraints (#1357) (#5939) 2019-02-03 23:56:53 +00:00
process Fix run command race (#1470) 2017-11-13 22:51:45 +08:00
public When redirecting clean the path to avoid redirecting to //www.othersite.com (#5669) 2019-01-09 13:39:01 -05:00
recaptcha Add Recaptcha functionality to Gitea (#4044) 2018-07-05 00:13:05 -04:00
search Global code search support (#3664) 2018-03-16 22:04:33 +08:00
setting Make log mailer for testing (#5893) 2019-02-02 21:06:52 -05:00
ssh Log IP of failed ssh connection (#5766) 2019-01-19 16:29:17 +00:00
sync Fix status table race condition (#1835) 2017-05-31 16:57:17 +08:00
templates Create Progressive Web App (#4730) 2018-11-27 10:18:26 -05:00
test Restrict permission check on repositories and fix some problems (#5314) 2018-11-28 19:26:14 +08:00
user Remove check for negative length (#5120) 2018-10-20 17:25:14 -04:00
util Disallow empty titles (#5785) 2019-01-21 13:45:32 +02:00
validation Improve URL validation for external wiki and external issues (#4710) 2018-08-15 09:29:37 +03:00