aboutsummaryrefslogtreecommitdiffstats
path: root/modules/setting
Commit message (Collapse)AuthorAgeFilesLines
* setting: don't require same running user for internal SSH (like win ↵Antoine GIRARD2019-06-161-1/+1
| | | | platform) (#7215)
* API error cleanup (#7186)John Olheiser2019-06-121-3/+9
|
* Add golangci (#6418)kolaente2019-06-122-7/+12
|
* fix GCArgs load from ini (#7156)Lunny Xiao2019-06-081-1/+1
|
* Repository avatar fallback configuration (#7087)Mario Lubenka2019-06-021-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Only show repository avatar in list when one was selected Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds fallback configuration option for repository avatar Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Implements repository avatar fallback Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds admin task for deleting generated repository avatars Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Solve linting issues Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Save avatar before updating database * Linting * Update models/repo.go Co-Authored-By: zeripath <art27@cantab.net>
* Repository avatars (#6986)Sergey Dryabzhinsky2019-05-291-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* when git version >= 2.18, git command could run with git wire protocol ↵Lunny Xiao2019-05-261-13/+24
| | | | version 2 param if enabled (#7047)
* Stop colorizing files by default (#6949)zeripath2019-05-151-2/+0
|
* Refactor models.NewRepoContext to extract git related codes to modules/git ↵Lunny Xiao2019-05-152-1/+5
| | | | | | | | | | (#6941) * refactor models.NewRepoContext to extract git related codes to modules/git * fix imports * refactor
* Add work path CLI option (#6922)zeripath2019-05-141-1/+4
| | | | | Makes it possible to set the work path as a CLI option instead of relying on environment variables which are somewhat opaque
* Move xorm logger bridge from log to models so that log module could be a ↵Lunny Xiao2019-05-141-3/+0
| | | | | | | | | | standalone package (#6944) * move xorm logger bridge from log to models so that log module could be a standalone package * fix tests * save logger on xorm log bridge
* Handle CORS requests (#6289)Tamal Saha2019-05-132-0/+42
|
* Remove local clones & make hooks run on merge/edit/upload (#6672)zeripath2019-05-111-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add options to git.Clone to make it more capable * Begin the process of removing the local copy and tidy up * Remove Wiki LocalCopy Checkouts * Remove the last LocalRepo helpers * Remove WithTemporaryFile * Enable push-hooks for these routes * Ensure tests cope with hooks Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove Repository.LocalCopyPath() * Move temporary repo to use the standard temporary path * Fix the tests Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove LocalWikiPath * Fix missing remove Signed-off-by: Andrew Thornton <art27@cantab.net> * Use AppURL for Oauth user link (#6894) * Use AppURL for Oauth user link Fix #6843 * Update oauth.go * Update oauth.go * internal/ssh: ignore env command totally (#6825) * ssh: ignore env command totally * Remove commented code Needed fix described in issue #6889 * Escape the commit message on issues update and title in telegram hook (#6901) * update sdk to latest (#6903) * improve description of branch protection (fix #6886) (#6906) The branch protection description text were not quite accurate. * Fix logging documentation (#6904) * ENABLE_MACARON_REDIRECT should be REDIRECT_MACARON_LOG * Allow DISABLE_ROUTER_LOG to be set in the [log] section * [skip ci] Updated translations via Crowdin * Move sdk structs to modules/structs (#6905) * move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor
* Fix logging documentation (#6904)zeripath2019-05-111-0/+2
| | | | | | * ENABLE_MACARON_REDIRECT should be REDIRECT_MACARON_LOG * Allow DISABLE_ROUTER_LOG to be set in the [log] section
* Show full name if DefaultShowFullName setting activated (#6710)Wim2019-05-081-0/+2
| | | | | Adds a new key DEFAULT_SHOW_FULL_NAME (default false) to the [ui] section. If enabled the full name will be shown (unless it's empty, then the default username will be used)
* Allow Recaptcha service url to be configured (#6820)zeripath2019-05-021-0/+2
|
* Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631)zeripath2019-04-291-13/+26
|
* Restore IsWindows variable assignment (#6722) (#6790)Nicola Scattaglia2019-04-281-0/+2
| | | Signed-off-by: Nicola Scattaglia <scattaglia.nicola.work@gmail.com>
* Prevent creating empty sessions (#6677)zeripath2019-04-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Prevent creating empty sessions Signed-off-by: Andrew Thornton <art27@cantab.net> * Update modules/setting/session.go * Remove unnecessary option Signed-off-by: Andrew Thornton <art27@cantab.net> * Add destory to list of ignored misspellings * rename cookie.go -> virtual.go * Delete old file * Add test to ensure that sessions are not created without being logged in Signed-off-by: Andrew Thornton <art27@cantab.net> * fix tests Signed-off-by: Andrew Thornton <art27@cantab.net> * Update integrations/create_no_session_test.go
* Add support for MS Teams webhooks (#6632)Daniel Grier2019-04-191-1/+1
|
* Telegram webhook (#4227)techknowlogick2019-04-181-1/+1
|
* Fixes 4762 - Content API for Creating, Updating, Deleting Files (#6314)Richard Mahn2019-04-171-0/+2
|
* Add SUBJECT_PREFIX mailer config option (#6605)zeripath2019-04-171-0/+2
| | | | | | | | * Add SUBJECT_PREFIX mailer config option * Add space between subject prefix and subject (Change from Gogs) Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add option to disable refresh token invalidation (#6584)Jonas Franz2019-04-121-0/+2
| | | | | | | | | | | | | | | | | | * Add option to disable refresh token invalidation Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add integration tests and remove wrong todos Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix typo Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix tests and add documentation Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Issue indexer queue redis support (#6218)Lunny Xiao2019-04-081-17/+21
| | | | | | | | | | | | | | | | | | * add redis queue * finished indexer redis queue * add redis vendor * fix vet * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md Co-Authored-By: lunny <xiaolunwen@gmail.com> * switch to go mod * Update required changes for new logging func signatures
* Quieter Integration Tests (#6513)zeripath2019-04-072-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | * Rename BaseLogger to WriterLogger to help the creation of other providers * Don't export ColorBytes and ResetBytes from ColoredValues * Make integration tests only print logs if they fail * check can color before coloring * I always forget about MSSQL * Oh and use LEVEL in sqlite.ini * Make the test logger log at info - as it means you see the router * Remove empty expected changes * Make the migrations quieter too * Don't display SQL on error - it can be looked at in the file logs if necessary * Fix skip when using onGiteaRun
* Better logging (#6038) (#6095)zeripath2019-04-027-197/+312
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
* move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364)Lunny Xiao2019-03-272-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move code.gitea.io/git to code.gitea.io/gitea/modules/git * fix imports * fix fmt * fix misspell * remove wrong tests data * fix unit tests * fix tests * fix tests * fix tests * fix tests * fix tests * enable Debug to trace the failure tests * fix tests * fix tests * fix tests * fix tests * fix tests * comment commit count tests since git clone depth is 50 * fix tests * update from code.gitea.io/git * revert change to makefile
* split setting.go to multiple files (#6154)Lunny Xiao2019-03-165-348/+433
| | | | | | * split setting.go to multiple files * fix lint
* Add InternalTokenURI to load InteralToken from an external file (#5812)techknowlogick2019-03-131-25/+73
|
* Integrate OAuth2 Provider (#5378)Jonas Franz2019-03-081-1/+48
|
* Add more tests and docs for issue indexer, add db indexer type for searching ↵Lunny Xiao2019-02-211-0/+1
| | | | | | | | | | | | | | from database (#6144) * add more tests and docs for issue indexer, add db indexer type for searching from database * fix typo * fix typo * fix lint * improve docs
* Refactor issue indexer (#5363)Lunny Xiao2019-02-192-9/+57
|
* Implement "conversation lock" for issue comments (#5073)Lanre Adelowo2019-02-181-0/+12
|
* Allow to set organization visibility (public, internal, private) (#1763)Rémy Boulanouar2019-02-181-1/+9
|
* Add option to close issues via commit on a non master branch (#5992)Lanre Adelowo2019-02-101-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fixes #5957 * add tests to make sure config option is respected * use already defined struct * - use migration to make the flag repo wide not for the entire gitea instance Also note that the config value can still be set so as to be able to control the value for new repositories that are to be created - fix copy/paste error in copyright header year and rearrange import - use repo config instead of server config value to determine if a commit should close an issue - update testsuite * use global config only when creating a new repository * allow repo admin toggle feature via UI * fix typo and improve testcase * fix fixtures * add DEFAULT prefix to config value * fix test
* Split setting.go as multiple files (#6014)Lunny Xiao2019-02-107-442/+509
| | | | | | * split setting.go as multiple files * fix comments
* add default time out for git operations (#6015)Lunny Xiao2019-02-091-0/+5
|
* Feature - Pagination for git tree API (#5838)Richard Mahn2019-02-061-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Feature - Pagination for git tree API * Handles case when page is negative * Does a for loop over the start and end rather than all entries * Removed redundent logic * Adds per_page as a query parameter * Adds DEFAULT_GIT_TREES_PER_PAGE for settings, ran make fmt * Fix typo in cheat-sheet en * Makes page start at 1, generated swagger * Use updates to SDK * Updates to use latest sdk * Updates swagger for tree api * Adds test for GetTreeBySHA * Updates per PR reviews * Updates per PR reviews * Remove file * Formatting * Fix to swagger file * Fix to swagger * Update v1_json.tmpl * Fix to swagger file
* Allow Macaron to be set to log through to gitea.log (#5667)zeripath2019-02-051-4/+6
| | | | | | * Allow Macaron to be set to log through gitea.log Fix #4291
* add other session providers (#5963)techknowlogick2019-02-051-2/+7
|
* Make log mailer for testing (#5893)zeripath2019-02-021-3/+14
| | | | | | | | | | | | | | | | | | * Create log mailer for testing email settings Signed-off-by: Andrew Thornton <art27@cantab.net> * Switch on the log mailer for the integration tests This ensures that the sending mail process works Signed-off-by: Andrew Thornton <art27@cantab.net> * rename the from user for mysql/mssql * rename log sender to dummy sender * update the integration tests
* Config option to disable automatic repo watching (#5852)sebastian-sauer2019-01-271-0/+2
| | | | | | | | | Add a new config option to enable / disable the automatic watching of repos for new repositories and if a user is added to a team. Fixes #653 Signed-off-by: Sebastian Sauer <sauer.sebastian@gmail.com>
* improve the releases api paging (#5831)Lunny Xiao2019-01-241-0/+2
| | | | | | * improve the releases api paging * add max limit on API paging
* Make db connect more robust (#5738)Paul Brackin2019-01-191-6/+10
|
* Moved defaults in defaults.go to setting.go (#5764)John Olheiser2019-01-192-15/+9
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Support CORS headers to git smart http protocol (#5719)Lunny Xiao2019-01-141-18/+20
|
* Allow for user specific themes (#5668)Lanre Adelowo2019-01-092-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | * add migration and basic UI for changing a user's theme * update user themem * use right text on button * load theme based on users' selection * load theme based on users' selection in pwa too * update sample config * delete older theme loading * implement AfterLoad to set users' theme properly * set up default theme when creating a user. This uses the installation wide theme * use flash messages for error * set default theme when creating a user from the cli * fix @lunny review
* fix lfs version check warning log when using ssh protocol (#5501)Lunny Xiao2018-12-191-21/+21
|
* Support reverse proxy providing email (#5554)zeripath2018-12-181-9/+13
| | | This PR implements #2347