2
0
Commit Graph

168 Commits

Author SHA1 Message Date
Unknwon
19ea718eeb #2852 code cleanup 2016-08-11 14:55:10 -07:00
Odin Ugedal
2ed68857cd Add initial support for unix sockets (#2852) 2016-08-11 14:46:33 -07:00
Thibault Meyer
8467154168 Fix typo CacheInternal -> CacheInterval (#3432) 2016-08-11 05:59:11 -07:00
Unknwon
2aff46601b Update bindata.go [CI SKIP] 2016-08-09 23:58:15 -07:00
Thibault Meyer
34ed7d24a1 Feature #3398: Redefine global mirror interval (#3409)
* add mirror::GLOBAL_INTERVAL on app.ini

* rename key to DEFAULT_INTERVAL

* add key on default app.ini + move code
2016-08-09 23:47:16 -07:00
Unknwon
722427e216 #3158 skip RUN_USER check on Windows 2016-08-09 17:41:18 -07:00
Unknwon
378f119181 #3091 add config option for Git GC 2016-08-09 17:24:32 -07:00
Unknwon
90d24701ae #3320 code cleanup 2016-08-07 11:01:47 -07:00
Sandro Santilli
82d2c65308 Add support for federated avatars (#3320)
* Add support for federated avatars

Fixes #3105

Removes avatar fetching duplication code
Adds an "Enable Federated Avatar" checkbox in user settings
(defaults to unchecked)

Moves avatar settings all in the same form, making
local and remote avatars mutually exclusive

Renames UploadAvatarForm to AvatarForm
as it's not anymore only for uploading

* Run gofmt on all modified files

* Move Avatar form in its own page

* Add go-libravatar dependency to vendor/ dir

Hopefully helps with accepting the contribution.
See also #3214

* Revert "Add go-libravatar dependency to vendor/ dir"

This reverts commit a8cb93ae640bbb90f7d25012fc257bda9fae9b82.

* Make federated avatar setting a global configuration

Removes the per-user setting

* Move avatar handling back to base tool, disable federated avatar in offline mode

* Format, handle error

* Properly set fallback host

* Use unsupported github.com mirror for importing go-libravatar

* Remove comment showing life exists outside of github.com

... pity, but contribution would not be accepted otherwise

* Use Combo for Get and Post methods over /avatar

* FEDERATED_AVATAR -> ENABLE_FEDERATED_AVATAR

* Fix persistance of federated avatar lookup checkbox at install time

* Federated Avatars -> Enable Federated Avatars

* Use len(string) == 0 instead of string == ""

* Move import line where it belong

See
https://github.com/Unknwon/go-code-convention/blob/master/en-US/import_packages.md

Pity the import url is still the unofficial one, but oh well...

* Save a line (and waste much more expensive time)

* Remove redundant parens

* Remove an empty line

* Remove empty lines

* Reorder lines to make diff smaller

* Remove another newline

Unknwon review got me start a fight against newlines

* Move DISABLE_GRAVATAR and ENABLE_FEDERATED_AVATAR after OFFLINE_MODE

On re-reading the diff I figured what Unknwon meant here:
https://github.com/gogits/gogs/pull/3320/files#r73741106

* Remove newlines that weren't there before my intervention
2016-08-07 10:27:38 -07:00
Unknwon
99728407d4 #3393 fix missing sub-url prefix in relative avatar link 2016-08-07 10:13:05 -07:00
Andrey Nering
6eee0a680e Improve diff highlight (#3390)
- Try to reduce memory allocations
- Add possibility to disable diff highlight (can improve performance for large diffs)
- Tweaking with cost for prettier (cleaner) diffs
- Do not calculate diff when the number of removed lines in a block is not equal to the number of added lines (this usually resulted in ugly diffs)
2016-08-07 09:49:47 -07:00
Unknwon
11e7ac2a93 Use struct for UI settings 2016-07-24 00:23:54 +08:00
Kim Carlbäcker
ba622c22cd [Fix] Don't display way too large files #1513 (#3253)
* Add MaxDisplayFileSize setting

* Don't show files that are too large

* Localized FileTooLarge

* Change IsFileTooBig => IsFileTooLarge
2016-07-12 06:21:26 +08:00
Unknwon
631defa243 #3058 #3059 support correct page size and link header 2016-07-04 17:27:06 +08:00
j.yao.SUSE
bd31471a2e change setting.go -> LocalUrl default value to (#3078) 2016-07-01 22:26:15 +08:00
Andrey Nering
e87fcdf88e Re-work MAX_DIFF_LINES: supress diff per file, not the whole diff (#3174) 2016-06-29 23:11:00 +08:00
Unknwon
8470f67eb6 #2954 use text/plain as default email content format 2016-05-30 01:32:01 -07:00
Unknwon
d166ec751a Remove code for checking ssh-keygen 2016-03-19 20:31:23 -04:00
Unknwon
579b59b60d #1891 attempt to fix invalid csrf token 2016-03-12 20:56:03 -05:00
Rodrigo Saboya
d689ed735e Making AppDataPath customizable. 2016-03-09 22:53:42 -03:00
Unknwon
8fbb98b3ee #1891 attempt to fix expected invalid CSRF token
- Remove unused config settings `[picture] service`
2016-03-03 15:09:43 -05:00
Unknwon
be385c12f7 Allow setting git operations timeouts
- Migrate: #2704 #2653
- Clone: #2701
- Mirror, Pull
2016-02-29 19:29:49 -05:00
Unknwon
4a378f95f8 Post work for #2637
Improve test cases, config settings, also show SSH config settings on admin config panel.
2016-02-27 20:48:39 -05:00
Unknwon
f0d2aeff72 Merge pull request #2637 from Gibheer/ssh-publickeys
allow native and ssh-keygen public key check
2016-02-27 18:55:14 -05:00
Unknwon
128394f9db Add new config option for builtin SSH server
Config option [server] SSH_LISTEN_PORT to the port the builtin SSH server will be listen.
It can be different from SSH_PORT which is supposed to be exposed in the clone URL.
This should solve the problem when user runs Gogs inside Docker container
and still want to use builtin SSH server.
2016-02-25 00:21:48 -05:00
Gibheer
9b36ea00d5 use StartSSHServer instead of DisableSSH
DisableSSH doesn't check the kind of ssh server to use, so that was
wrong. Use StartSSHServer instead.
2016-02-23 15:43:52 +01:00
Gibheer
350d3a98e0 seperate ssh constants from schema constants
The contants were placed in the same section as the scheme ones, which
may lead to confusion.
2016-02-23 15:41:44 +01:00
Gibheer
ab652f501e allow native and ssh-keygen public key check
This commit adds the possibibility to use either the native golang
libraries or ssh-keygen to check public keys. The check is adjusted
depending on the settings, so that only supported keys are let through.

This commit also brings back the blacklist feature, which was removed in
16796f2763. This allows to blacklist
algorythms or keys based on the key length. This works with the native
and the ssh-keygen way.

Because of #2179 it also includes a way to adjust the path to
ssh-keygen and the working directory for ssh-keygen. With this,
sysadmins should be able to adjust the settings in a way, that SELinux
is okay with it. In the worst case, they can switch to the native
implementation and only loose support for ed25519 keys at the moment.
There are some other places which need adjustment to utilize the
parameters and the native implementation, but this sets the ground work.
2016-02-16 23:01:56 +01:00
Unknwon
354dd25700 Remove cache avatar support and add its tests 2016-02-14 23:14:55 -05:00
Andrey Nering
ce1ab1ad2d Implementing the "theme-color" meta tag.
Used by Android >= 5.0 to make the top bar colored.

Reference: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
2016-02-08 17:03:18 -02:00
Unknwon
b52970cd3d Merge pull request #2406 from bkcsoft/feature/markdown-custom-url-scheme
Feature/markdown custom url scheme
2016-02-05 13:11:45 -05:00
Unknwon
a7126a11d5 #2229 adjust URL verbose depth for reverse proxy sub-path 2016-01-31 15:38:20 -05:00
miles@Oscar
7ebbc80bbb Using https for gravatar 2016-01-29 13:06:17 +08:00
miles@Oscar
d11b794f8a Fixed gravatar url 2016-01-29 11:05:41 +08:00
Kim "BKC" Carlbäcker
93d56ee5af Custom URL-Schemas for Markdown 2016-01-27 02:02:03 +01:00
Pourya Daneshvar
740bc4663c Fixed forgotten err variable assignment 2016-01-24 10:24:21 +03:30
Unknwon
16796f2763 #2179 use Go sub-repo ssh to verify public key content 2016-01-15 18:39:51 +08:00
Unknwon
03ebfbdf21 fix #1436 2015-12-19 21:43:32 -05:00
Unknwon
dc1e5fc70b fix #2189 2015-12-18 05:49:28 -05:00
Unknwon
112b78ff45 #2103 Ability to map extensions for syntax highlighting in config 2015-12-17 22:31:34 -05:00
Unknwon
6f6c77a6cd #1692 add organization APIs 2015-12-17 02:28:47 -05:00
Unknwon
74ceced0e8 #1575 Limit repo creation 2015-12-10 12:37:53 -05:00
Adam Strzelecki
d89e6415cc LOCAL_ROOT_URL for workers accessing web service
Local (DMZ) URL for gogs workers (such as ssh update) accessing web service. In
most cases you do not need to change default http://localhost:HTTP_PORT/. You
may need to alter it only if your ssh server node is not the same as http node,
eg. running behind proxy on different node than web server.

                     --- 80 public port -> 8080 -- web server node
                    /
    public proxy --<
                    \
                     --- 22 public port -> 10022 -- ssh server node

This option is not intended to be accessible via web GUI settings, since it is
unlikely someone needs to change it to somethings else than default
http://localhost:HTTP_PORT/ which should work for most of the cases.

But this should land into the documentation somewhere.

fixup
2015-12-09 23:11:07 +01:00
Unknwon
d97809d3e2 #1943 Able to config fsck timeout 2015-12-09 11:38:12 -05:00
Unknwon
902a4d6a68 #2115 more precise error message 2015-12-08 01:11:40 -05:00
Unknwon
2eb660382b remove tags redis and memcache 2015-11-21 17:21:22 -05:00
Gibheer
20f08a2985 fix old naming
This is the old naming of the variable and I forgot to fix it. It now
works and is tested.
2015-11-18 23:12:42 +01:00
Gibheer
0196a37127 fix #1957 - disable version display
This allows the admin to disable the version information about gogs and
go in use in the footer.
2015-11-18 22:32:31 +01:00
Unknwon
b34fccd2c7 fix 1540 and experimental SSH server support 2015-11-08 16:59:56 -05:00
Unknwon
5b579c11bb add Makefile 2015-11-03 12:16:43 -05:00