You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/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
5 years ago
..
auth Request for public keys only if LDAP attribute is set (#5816) 6 years ago
avatar Use assert in legacy unit tests (#867) 7 years ago
base Serve audio files using HTML5 audio tag (#5221) 6 years ago
cache Fix memcache support when value is returned as string always (#2924) 7 years ago
context Provide better panic handling (#5902) 5 years ago
cron Add branch overiew page (#2108) 7 years ago
generate Implements generator cli for secrets (#3531) 6 years ago
gzip Pooled and buffered gzip implementation (#5722) 6 years ago
highlight No highlighting for .txt files (#1922) 7 years ago
httplib Add sensitive headers (#3429) 7 years ago
indexer fix indexer reindex bug when gitea restart (#5563) 6 years ago
lfs Fix bug when read public repo lfs file (#5912) 5 years ago
log Remove maxlines option for file logger (#5282) 6 years ago
mailer Make log mailer for testing (#5893) 5 years ago
markup Recover panic in orgmode.Render if bad orgfile (#4982) (#5903) 5 years ago
metrics Prometheus endpoint (#5256) 6 years ago
minwinsvc Fix Git hooks not being executed on Windows when running as a service (#1149) 7 years ago
notification Refactor notification for indexer (#5111) 6 years ago
options Fix typos in models/ and modules/ (#1248) 7 years ago
pprof cmd/serve: pprof cpu and memory profile dumps to disk (#4560) 6 years ago
private Fix ssh deploy and user key constraints (#1357) (#5939) 5 years ago
process Fix run command race (#1470) 7 years ago
public When redirecting clean the path to avoid redirecting to //www.othersite.com (#5669) 6 years ago
recaptcha Add Recaptcha functionality to Gitea (#4044) 6 years ago
search Global code search support (#3664) 6 years ago
setting Make log mailer for testing (#5893) 5 years ago
ssh Log IP of failed ssh connection (#5766) 6 years ago
sync Fix status table race condition (#1835) 7 years ago
templates Create Progressive Web App (#4730) 6 years ago
test Restrict permission check on repositories and fix some problems (#5314) 6 years ago
user Remove check for negative length (#5120) 6 years ago
util Disallow empty titles (#5785) 6 years ago
validation Improve URL validation for external wiki and external issues (#4710) 6 years ago