KN4CK3R
44b8b07631
Add tag protection ( #15629 )
...
* Added tag protection in hook.
* Prevent UI tag creation if protected.
* Added settings page.
* Added tests.
* Added suggestions.
* Moved tests.
* Use individual errors.
* Removed unneeded methods.
* Switched delete selector.
* Changed method names.
* No reason to be unique.
* Allow editing of protected tags.
* Removed unique key from migration.
* Added docs page.
* Changed date.
* Respond with 404 to not found tags.
* Replaced glob with regex pattern.
* Added support for glob and regex pattern.
* Updated documentation.
* Changed white* to allow*.
* Fixed edit button link.
* Added cancel button.
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years ago
KN4CK3R
4cc63e9919
Fix diff expansion is missing final line in a file ( #16222 )
...
* Fixed down offset.
* Fixed wrong line count result.
4 years ago
Lunny Xiao
b223d36195
Rework repository archive ( #14723 )
...
* Use storage to store archive files
* Fix backend lint
* Add archiver table on database
* Finish archive download
* Fix test
* Add database migrations
* Add status for archiver
* Fix lint
* Add queue
* Add doctor to check and delete old archives
* Improve archive queue
* Fix tests
* improve archive storage
* Delete repo archives
* Add missing fixture
* fix fixture
* Fix fixture
* Fix test
* Fix archiver cleaning
* Fix bug
* Add docs for repository archive storage
* remove repo-archive configuration
* Fix test
* Fix test
* Fix lint
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
KN4CK3R
383ffcfa34
Small refactoring of modules/private ( #15947 )
...
* Use correct variable name.
* doer is never nil here.
* Use status code constants.
* Replaced generic map with concrete struct.
* Fixed windows lint.
* Removed unused method.
* Changed error codes.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
zeripath
196593e2e9
More efficiently parse shas for shaPostProcessor ( #16101 )
...
* More efficiently parse shas for shaPostProcessor
The shaPostProcessor currently repeatedly calls git rev-parse --verify on both backends
which is fine if there is only one thing that matches a sha - however if there are
multiple things then this becomes wildly inefficient.
This PR provides functions for both backends which are much faster to use.
Fix #16092
* Add ShaExistCache to RenderContext
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
4 years ago
KN4CK3R
29695cd6d5
Add asymmetric JWT signing ( #16010 )
...
* Added asymmetric token signing.
* Load signing key from settings.
* Added optional kid parameter.
* Updated documentation.
* Add "kid" to token header.
4 years ago
zeripath
6d69df2804
Add Status Updates whilst Gitea migrations are occurring ( #15076 )
...
* Add migrating message
Signed-off-by: Andrew Thornton <art27@cantab.net>
* simplify messenger
Signed-off-by: Andrew Thornton <art27@cantab.net>
* make messenger an interface
Signed-off-by: Andrew Thornton <art27@cantab.net>
* rename
Signed-off-by: Andrew Thornton <art27@cantab.net>
* prepare for merge
Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per tech
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
4 years ago
KN4CK3R
ebf253b841
Add attachments for PR reviews ( #16075 )
...
* First step for multiple dropzones per page.
* Allow attachments on review comments.
* Lint.
* Fixed accidental initialize of the review textarea.
* Initialize SimpleMDE textarea.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
KN4CK3R
440039c0cc
Add push to remote mirror repository ( #15157 )
...
* Added push mirror model.
* Integrated push mirror into queue.
* Moved methods into own file.
* Added basic implementation.
* Mirror wiki too.
* Removed duplicated method.
* Get url for different remotes.
* Added migration.
* Unified remote url access.
* Add/Remove push mirror remotes.
* Prevent hangs with missing credentials.
* Moved code between files.
* Changed sanitizer interface.
* Added push mirror backend methods.
* Only update the mirror remote.
* Limit refs on push.
* Added UI part.
* Added missing table.
* Delete mirror if repository gets removed.
* Changed signature. Handle object errors.
* Added upload method.
* Added "upload" unit tests.
* Added transfer adapter unit tests.
* Send correct headers.
* Added pushing of LFS objects.
* Added more logging.
* Simpler body handling.
* Process files in batches to reduce HTTP calls.
* Added created timestamp.
* Fixed invalid column name.
* Changed name to prevent xorm auto setting.
* Remove table header im empty.
* Strip exit code from error message.
* Added docs page about mirroring.
* Fixed date.
* Fixed merge errors.
* Moved test to integrations.
* Added push mirror test.
* Added test.
4 years ago
Lunny Xiao
5d113bdd19
Improve performance of dashboard list orgs ( #16099 )
...
* Improve performance of dashboard list orgs
* Fix wrong error description
* unexport queryUserOrgIDs method
* SimpleOrg -> MinimalOrg
* .
Co-authored-by: 6543 <6543@obermui.de>
4 years ago
KN4CK3R
1295e750b4
Add OpenID claims "profile" and "email". ( #16141 )
...
* Added OpenID claims "profile" and "email".
* Splitted error.
* Added scopes_supported and claims_supported.
* Added more metadata.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago
Lunny Xiao
fb3ffeb18d
Add sso.Group, context.Auth, context.APIAuth to allow auth special routes ( #16086 )
...
* Add sso.Group, context.Auth, context.APIAuth to allow auth special routes
* Remove unnecessary check
* Rename sso -> auth
* remove unused method of Auth interface
4 years ago
Lunny Xiao
da057996d5
Fix http path bug ( #16117 )
...
* Fix http path bug
* Add missed request
* add tests
Co-authored-by: 6543 <6543@obermui.de>
4 years ago
Lunny Xiao
1bfb0a24d8
Refactor routers directory ( #15800 )
...
* refactor routers directory
* move func used for web and api to common
* make corsHandler a function to prohibit side efects
* rm unused func
Co-authored-by: 6543 <6543@obermui.de>
4 years ago