This removes the jQuery plugin as well as the associated config options.
Native input[type=date] does not require a language attribute as it is
localized by default, except for the placeholder attribute for which I
currently piggy-back the repo.issues.due_date_form localization option.
Implementation should pretty much match GH. Of note is that Safari does
not provide a UI for this input type, but I don't think providing one is
neccessary and GH did not bother either.
Co-authored-by: techknowlogick <[email protected]>
* Dump: Use mholt/archive/v3 to support tar including many compressions
Signed-off-by: Philipp Homann <[email protected]>
* Dump: Allow dump output to stdout
Signed-off-by: Philipp Homann <[email protected]>
* Dump: Fixed bug present since #6677 where SessionConfig.Provider is never "file"
Signed-off-by: Philipp Homann <[email protected]>
* Dump: never pack RepoRootPath, LFS.ContentPath and LogRootPath when they are below AppDataPath
Signed-off-by: Philipp Homann <[email protected]>
* Dump: also dump LFS (fixes#10058)
Signed-off-by: Philipp Homann <[email protected]>
* Dump: never dump CustomPath if CustomPath is a subdir of or equal to AppDataPath (fixes#10365)
Signed-off-by: Philipp Homann <[email protected]>
* Use log.Info instead of fmt.Fprintf
Signed-off-by: Philipp Homann <[email protected]>
* import ordering
* make fmt
Co-authored-by: zeripath <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: Matti R <[email protected]>
GH has different HardBreaks behaviour for markdown comments and documents.
Comments have hard breaks and documents have soft breaks - therefore Gitea's rendering will always be different from GH's if we only provide one setting.
Here we split the setting in to two - one for documents and one for comments and other things.
Signed-off-by: Andrew Thornton [email protected]
Changes to index.js as per @silverwind
Co-authored-by: silverwind <[email protected]>
Changes to docs as per @guillep2k
Co-authored-by: guillep2k <[email protected]>
InternalTokens are fixed as alphanum strings therefore TrimSpace from these.
Also use isatty to not add a terminal newline when redirecting generate.
Fix#11498
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
* Refactor Cron and merge dashboard tasks
* Merge Cron and Dashboard tasks
* Make every cron task report a system notice on completion
* Refactor the creation of these tasks
* Ensure that execution counts of tasks is correct
* Allow cron tasks to be started from the cron page
* golangci-lint fixes
* Enforce that only one task with the same name can be registered
Signed-off-by: Andrew Thornton <[email protected]>
* fix name check
Signed-off-by: Andrew Thornton <[email protected]>
* as per @guillep2k
* as per @lafriks
Signed-off-by: Andrew Thornton <[email protected]>
* Add git.CommandContext variants
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
* Use AJAX for notifications table
Signed-off-by: Andrew Thornton <[email protected]>
* move to separate js
Signed-off-by: Andrew Thornton <[email protected]>
* placate golangci-lint
Signed-off-by: Andrew Thornton <[email protected]>
* Add autoupdating notification count
Signed-off-by: Andrew Thornton <[email protected]>
* Fix wipeall
Signed-off-by: Andrew Thornton <[email protected]>
* placate tests
Signed-off-by: Andrew Thornton <[email protected]>
* Try hidden
Signed-off-by: Andrew Thornton <[email protected]>
* Try hide and hidden
Signed-off-by: Andrew Thornton <[email protected]>
* More auto-update improvements
Only run checker on pages that have a count
Change starting checker to 10s with a back-off to 60s if there is no change
Signed-off-by: Andrew Thornton <[email protected]>
* string comparison!
Signed-off-by: Andrew Thornton <[email protected]>
* as per @silverwind
Signed-off-by: Andrew Thornton <[email protected]>
* add configurability as per @6543
Signed-off-by: Andrew Thornton <[email protected]>
* Add documentation as per @6543
Signed-off-by: Andrew Thornton <[email protected]>
* Use CSRF header not query
Signed-off-by: Andrew Thornton <[email protected]>
* Further JS improvements
Fix @etzelia update notification table request
Fix @silverwind comments
Co-Authored-By: silverwind <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
* Simplify the notification count fns
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: silverwind <[email protected]>
Some OAuth2 providers return quite large structured tokens >32767 bytes.
Gitea currently has a fixed maximum of 32767 bytes for these and
unfortunately due to the convoluted nature of the dependent libraries the
error returned is rather opaque.
Here we manage the error a little better - detecting the rather opaque
github.com/gorilla/securecookie.errEncodedValueTooLong and converting
it to a more readable error.
Further we provide a configurable option to increase the maximum size of
the provided OAuth2 tokens.
Fix#9907
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
* Add more logging in the LFS server
Adds more logging in the LFS server and stops sending internal server
error information to the client
* Add LFS Lock cursor implementation
* Simplify Claims in LFS and remove the float64 casts
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
* Make CertFile and KeyFile relative to CustomPath
The current code will absolute CertFile and KeyFile against the current working directory. This is quite unexpected for users. This code makes relative paths absolute against the CustomPath.
Fix#4196
* Improve error reporting when reading certificates
* Apply suggestions from code review
Co-Authored-By: guillep2k <[email protected]>
Co-authored-by: guillep2k <[email protected]>
The minimum key size defaults weren't set as suggested in app.ini.sample
so if you enabled MINIMUM_KEY_SIZE_CHECK it would always fail since
there would be no matching values to check against. This pr adds the
default values that should have been there.
Should fix#9465
* reject reactions wich ar not allowed
* dont duble check CreateReaction now throw ErrForbiddenIssueReaction
* add /repos/{owner}/{repo}/issues/comments/{id}/reactions endpoint
* add Find Functions
* fix some swagger stuff + add issue reaction endpoints + GET ReactionList now use FindReactions...
* explicite Issue Only Reaction for FindReactionsOptions with "-1" commentID
* load issue; load user ...
* return error again
* swagger def canged after LINT
* check if user has ben loaded
* add Tests
* better way of comparing results
* add suggestion
* use different issue for test
(dont interfear with integration test)
* test dont compare Location on timeCompare
* TEST: add forbidden dubble add
* add comments in code to explain
* add settings.UI.ReactionsMap
so if !setting.UI.ReactionsMap[opts.Type] works
* add [ui] Reactions
* move contend check from form to go functions
* use else if
* check if reaction is allowed only on react
(so previous custom reaction can be still removed)
* use $.AllowedReactions in templates
* use ctx.Flash.Error
* use it there too
* add redirection
* back to server error
because a wrong reaction is a template issue ...
* add emoji list link
* add docs entry
* small wording nit
suggestions from @jolheiser - thx
* same reactions as github
* fix PR reactions
* handle error so template JS could check
* Add Integrations Test
* add REACTIONS setting to cheat-sheet doc page
* Add USE_SERVICE_WORKER setting
This will be very useful setting for anyone doing frontend work.
Fixes: https://github.com/go-gitea/gitea/issues/9044
* prevent potential syntax error on old browsers
* Graceful Shutdown for windows and others
Restructures modules/graceful, adding shutdown for windows, removing and
replacing the old minwinsvc code.
Creates a new waitGroup - terminate which allows for goroutines to
finish up after the shutdown of the servers.
Shutdown and terminate hooks are added for goroutines.
* Remove unused functions - these can be added in a different PR
* Add startup timeout functionality
* Document STARTUP_TIMEOUT
* Add retry for migration http/https requests
* give the more suitable name for retry configuraion items
* fix docs and lint
* Only use retryDownloader when setting > 1
* static url
* add cors support for static resources
* [assets] work on the migration to configurable url for assets
Signed-off-by: Jakob Ackermann <[email protected]>
* [misc] fix whitespace
Signed-off-by: Jakob Ackermann <[email protected]>
* [assets] fix the loading of the manifest.json
It is generated dynamically, and as such can not be served by the cdn.
Signed-off-by: Jakob Ackermann <[email protected]>
* Revert "add cors support for static resources"
This reverts commit 42f964fd18
Signed-off-by: Jakob Ackermann <[email protected]>
* [docs] add the STATIC_URL_PREFIX option
Signed-off-by: Jakob Ackermann <[email protected]>
* [docs] reverse-proxy: nginx: add two setups for STATIC_URL_PREFIX
Signed-off-by: Jakob Ackermann <[email protected]>
* [assets] migrate the url of a new asset to the static url prefix
REF: f2a3abc683
Signed-off-by: Jakob Ackermann <[email protected]>
* Prevent deadlock in indexer initialisation during graceful restart
* Move from gracehttp to our own service to add graceful ssh
* Add timeout for start of indexers and make hammer time configurable
* Fix issue with re-initialization in indexer during tests
* move the code to detect use of closed to graceful
* Handle logs gracefully - add a pid suffix just before restart
* Move to using a cond and a holder for indexers
* use time.Since
* Add some comments and attribution
* update modules.txt
* Use zero to disable timeout
* Move RestartProcess to its own file
* Add cleanup routine
Add password complexity checks. The default settings require a lowercase, uppercase, number and a special character within passwords.
Co-Authored-By: T-M-A <[email protected]>
Co-Authored-By: Lanre Adelowo <[email protected]>
Co-Authored-By: guillep2k <[email protected]>
Co-Authored-By: Lauris BH <[email protected]>
* Add Backend Logic for Toggling Email Notification
This commit adds the backend logic for
allowing users to enable or disable email
notifications. The implementation ensures
that only issue notification emails get disabled
and important emails are still sent regardless
of the setting.
The UI to toggle this setting has not yet been
implemented.
* Add UI and complete user email notification enable
This commit completes the functionality to allow
users to disable their own email notifications.
Signed-off-by: Gary Kim <[email protected]>
* Add Third Option for Only Email on Mention
Signed-off-by: Gary Kim <[email protected]>
* Readd NOT NULL to new preference string
Signed-off-by: Gary Kim <[email protected]>
* Add Tests and Rewrite Comment
Signed-off-by: Gary Kim <[email protected]>
* Allow admin to set default email frequency
Signed-off-by: Gary Kim <[email protected]>
* Add new config option to docs
Signed-off-by: Gary Kim <[email protected]>
* Fix a few mistakes
Signed-off-by: Gary Kim <[email protected]>
* Only update required columns
Signed-off-by: Gary Kim <[email protected]>
* Simplify an error check
Signed-off-by: Gary Kim <[email protected]>
* Make email_notification_preference column in DB be VARCHAR(20)
Signed-off-by: Gary Kim <[email protected]>
* Handle errors
Signed-off-by: Gary Kim <[email protected]>
* Update models/migrations/v93.go
Co-Authored-By: Lauris BH <[email protected]>
* Add description in repository search.
Signed-off-by: David Svantesson <[email protected]>
* Refactor SearchRepositoryByName with a general function SearchRepository
Signed-off-by: David Svantesson <[email protected]>
* Allow to specify if description shall be included in API repo search.
Signed-off-by: David Svantesson <[email protected]>
* Add new app.ini setting for whether to search within repo description.
Signed-off-by: David Svantesson <[email protected]>
* Search keyword in description (if setting enabled) on:
- Explore page
- Organization profile page
- User profile page
- Admin repo page
Do not search keyword in description on:
- Any non-keyword search (not relevant)
- Incremental search (uses API)
Signed-off-by: David Svantesson <[email protected]>
* Put parameters related to keyword directly after it
Signed-off-by: David Svantesson <[email protected]>
* Add test cases for including (and not including) repository description in search.
Signed-off-by: David Svantesson <[email protected]>
* Rename test function from TestSearchRepositoryByName to TestSearchRepository.
Signed-off-by: David Svantesson <[email protected]>
* Make setting SEARCH_REPO_DESCRIPTION default to true
Signed-off-by: David Svantesson <[email protected]>
* display ui time with customize time location
* fix lint
* rename UILocation to DefaultUILocation
* move time related functions to modules/timeutil
* fix tests
* fix tests
* fix build
* fix swagger
* Only show repository avatar in list when one was selected
Signed-off-by: Mario Lubenka <[email protected]>
* Adds fallback configuration option for repository avatar
Signed-off-by: Mario Lubenka <[email protected]>
* Implements repository avatar fallback
Signed-off-by: Mario Lubenka <[email protected]>
* Adds admin task for deleting generated repository avatars
Signed-off-by: Mario Lubenka <[email protected]>
* Solve linting issues
Signed-off-by: Mario Lubenka <[email protected]>
* Save avatar before updating database
* Linting
* Update models/repo.go
Co-Authored-By: zeripath <[email protected]>
* Repository avatars
- first variant of code from old work for gogs
- add migration 87
- add new option in app.ini
- add en-US locale string
- add new class in repository.less
* Add changed index.css, remove unused template name
* Update en-us doc about configuration options
* Add comments to new functions, add new option to docker app.ini
* Add comment for lint
* Remove variable, not needed
* Fix formatting
* Update swagger api template
* Check if avatar exists
* Fix avatar link/path checks
* Typo
* TEXT column can't have a default value
* Fixes:
- remove old avatar file on upload
- use ID in name of avatar file - users may upload same files
- add simple tests
* Fix fmt check
* Generate PNG instead of "static" GIF
* More informative comment
* Fix error message
* Update avatar upload checks:
- add file size check
- add new option
- update config docs
- add new string to en-us locale
* Fixes:
- use FileHEader field for check file size
- add new test - upload big image
* Fix formatting
* Update comments
* Update log message
* Removed wrong style - not needed
* Use Sync2 to migrate
* Update repos list view
- bigger avatar
- fix html blocks alignment
* A little adjust avatar size
* Use small icons for explore/repo list
* Use new cool avatar preparation func by @lafriks
* Missing changes for new function
* Remove unused import, move imports
* Missed new option definition in app.ini
Add file size check in user/profile avatar upload
* Use smaller field length for Avatar
* Use session to update repo DB data, update DeleteAvatar - use session too
* Fix err variable definition
* As suggested @lafriks - return as soon as possible, code readability