0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-20 14:04:24 +01:00
gitea/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
base Serve audio files using HTML5 audio tag (#5221) 2018-10-30 10:17:26 +08:00
cache
context Provide better panic handling (#5902) 2019-01-30 17:00:00 -05:00
cron
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
httplib
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
notification Refactor notification for indexer (#5111) 2019-01-17 22:23:22 +08:00
options
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
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
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