2005 Commits

Author SHA1 Message Date
unknwon
1c82c42cb3
locale: sync from Crowdin 2019-10-03 20:35:32 -07:00
unknwon
847c06d88b
templates/repo: remove unnecessary wrap div 2019-09-21 20:48:09 -07:00
Alexey Agafonov
209569a035 repo: allow admin to remove observers from the repository (#5782) (#5803)
* admin can remove observers from the repository (#5782)

* admin can remove observers from the repository (#5782)

* admin can remove observers from the repository (#5782)

* admin can remove observers from the repository (#5782)

* admin can remove observers from the repository (#5782)
2019-09-21 20:37:20 -07:00
unknwon
8675dff045
locale: sync from Crowdin 2019-09-15 11:04:40 -07:00
张怡秋
ed2adc7025 templates/mail: modify the year at the footer (#5793) 2019-09-13 13:28:57 -07:00
unknwon
c154721f4a
Bump version 2019-08-11 18:59:46 -07:00
unknwon
f1e0ebfe93
routes/api/v1: codemod 2019-08-10 13:40:48 -07:00
unknwon
c7ba519af2
routes/api/v1: codemod 2019-08-08 23:53:43 -07:00
unknwon
a36b29c25c
Bump version 2019-08-01 18:41:45 -07:00
unknwon
35e2cee5c5
pkg/template: use template function Year to get number of year
To avoid update in each year
2019-07-28 15:10:44 -07:00
unknwon
d775fe7936
pkg/context: change banner file path (#5750) 2019-07-28 14:59:51 -07:00
Achilleas Koutsou
dc13eb6df0 pkg/context: Render live notice banner from file (#5750)
* pkg/context: Render live notice banner from file

- Contexter checks if there is a file called 'notice' under the
GOGS_CUSTOM directory and loads it.
- The first line is treated as a header/title and everything else as the
message body.
- Message body is rendered as HTML (tags allowed).
- File size is limited to 1024 bytes.
- File mime type must be text.
- Notice is rendered in head.tmpl for all pages.

* pkg/context: Rename maxlen to maxSize

Rename maxlen to maxSize for the maximum size (in bytes) of the notice
file to render.
Define the variable when needed to avoid instantiating it when the file
doesn't exist.

Co-Authored-By: ᴊ. ᴄʜᴇɴ <u@gogs.io>

* pkg/context: Package name after license header

Co-Authored-By: ᴊ. ᴄʜᴇɴ <u@gogs.io>

* pkg/context: Don't print 'Found notice file'

Becomes too verbose as it prints on every page load when the file
exists.

* pkg/context: Match project conventions

Import order and grouping

Variable names:
    fileloc -> fpath
    fp -> f
    finfo -> fi

* pkg/context: Remove empty line

Co-Authored-By: ᴊ. ᴄʜᴇɴ <u@gogs.io>

* pkg/context: Render notice as markdown

Server notice file should be named 'notice.md'.  The contents of the
file are treated as markdown and rendered as a warning message at the
top of every page.

* Update notice.go


Co-authored-by: ᴊ. ᴄʜᴇɴ <u@gogs.io>
2019-07-27 23:47:35 -07:00
Unknwon
25fdf6cb16
locale: sync from Crowdin 2019-06-27 08:32:59 -04:00
Unknwon
8b383f86de pkg/bindata: regenerate for PR #5623 2019-02-20 17:56:43 -05:00
Unknwon
0a176df6fb models: disable idle connection and set connection max life time (#5532) 2019-02-06 18:46:15 -05:00
Unknwon
06b6eaba06
locale: sync from Crowdin
- Add Portuguese
2019-01-30 21:59:10 -05:00
Unknwon
9ff2df78f0 public/css: make less (#5317) 2018-12-25 08:58:59 -05:00
Unknwon
e70e72e025 pkg/ssh: specify ssh-keygen to always generate PEM format 2018-12-19 08:31:22 -05:00
Unknwon
657ea2686f
auth: coding style and glitches fixes for GitHub login source (#5340) 2018-12-18 16:46:50 -05:00
haixunlu
311df9c521 auth: add new authentication source: GitHub, including GitHub Enterprise (#5340)
* Add new Authentication Source: GitHub, including GitHub Enterprise.

* Add vendor dependencies.
2018-12-18 15:49:30 -05:00
Unknwon
ff93d9dbda
pkg/tool: improve SanitizePath (#5558) 2018-12-18 01:38:08 -05:00
Unknwon
d74437af57
models/action: skip issue index parsing while using external issue tracker (#5551) 2018-12-17 22:52:58 -05:00
Unknwon
f91cb9321e
api: add GetReferenceSHA (#5546) 2018-12-16 19:47:32 -05:00
Unknwon
8e2c3b315b
models: remove legacy support 2018-12-11 22:00:01 -05:00
Unknwon
db3f0048d8
templates: rename template function Str2html -> Str2HTML 2018-12-10 22:23:56 -05:00
Unknwon
d3d8284985
templates: sanitize special links in commit message (#5545)
Reported by @cezar97.
2018-12-10 22:21:42 -05:00
Unknwon
f545faa06d
templates: make state changing routes to POST method (#5541)
- pkg/context: add ParamsUser to unify the injection process
2018-12-06 22:58:02 -05:00
Unknwon
458aadbb10
vendor: update github.com/go-macaron/session 2018-12-04 19:36:05 -05:00
Unknwon
a7e8187a0d
pkg/context: expose port in import path for 'go-get=1' (#5305) 2018-12-03 13:24:31 -05:00
Unknwon
29c5be47ed
models/issue: fix panic when clear labels (#5445) 2018-12-02 17:51:24 -05:00
Unknwon
e1b3a25008
api/repo: support edit repository issue tracker (gogs/go-gogs-client#94) 2018-12-02 12:55:05 -05:00
Unknwon
ce13fbb98a
routes/api: allow get repository without login (#5475) 2018-12-01 21:40:19 -05:00
Samuel Cochran
084d9e0009 templates/user/dashboard: include 'org' query parameter in new mirror URL (#5534) 2018-11-29 07:21:16 -05:00
Unknwon
3db9b06a6e
api: fix critical CSRF vulnerabilities on API routes (#5355)
By explicitly requires token authentication.
2018-11-28 21:05:58 -05:00
Unknwon
1f9e21ebd5
templates/wiki: fix emoji rendering (#4869) 2018-11-26 07:02:21 -05:00
Federico Culloca
81effe674d templates/user/profile: added rel="me" to website link on user profile (#5485)
* Added rel="me" to website link on user profile

See issue #5008

* Added `nofollow` as per feedback
2018-11-12 20:49:30 -05:00
Unknwon
b93079f1c1
vendor: update github.com/go-macaron/session (#5469)
Fix security flaw reported by c957861129d62331c5704d2f04d11e41.
2018-10-24 09:43:59 -04:00
Unknwon
a1098384c0
vendor: update github.com/gogs/git-module 2018-10-23 07:02:13 -04:00
Unknwon
0d66b1cc1c
pkg/context: apply EscapePound at context level
Always escape template variable {{.Link}} variable and  redirect calls.

Relates to #5442
2018-09-28 23:56:45 -04:00
Unknwon
1843354d88
templates/repo/setting: fix missing EscapePound (#5442) 2018-09-28 23:32:00 -04:00
Unknwon
bd7d1e2f16
routes: fix open redirect vulnerability (#5355)
Reported by @cezar97.
2018-09-28 23:19:29 -04:00
Unknwon
aff0bbcc32
pkg/ssh: print actual error in panic (#5435) 2018-09-28 15:37:34 -04:00
Unknwon
3a4c981e31
locale: sync from Crowdin 2018-09-16 11:53:32 -04:00
Unknwon
520530dfcf
metrics: add initial Prometheus support (#4141) 2018-09-14 22:29:43 -04:00
Unknwon
1ec365de25
repo: trigger webhook when delete branch after merged pull request (#5331) 2018-09-14 20:04:31 -04:00
Unknwon
32479744f6
templates/admin/monitor: fix field error
[ci skip]
2018-09-13 23:30:59 -04:00
Unknwon
b68de2330d
auth: support set default login source (#5274) 2018-09-13 14:06:04 -04:00
haixunlu
68a6579852 login_source: add default authentication switch (#5338)
* Add default Authentication Switch.

* adjust the code accroding to reviews

* #1. Remove redudant logic.
#2, Fix a bug in "Edit" panel.

* Remove unused logic

* Fix local authentication files are not flushed.

* refactor according to review.
2018-09-13 13:49:07 -04:00
Jakob Lykke Andersen
798798f7ab templates: hide dashboard org creation when not allowed (#5393)
The admin -> DISABLE_REGULAR_ORG_CREATION setting
hides organization creation in the header, but not
in the dashboard.
2018-09-11 14:10:09 -04:00
Unknwon
f7b9f35ce1
locale: sync from Crowdin 2018-09-10 10:41:00 -04:00