Commit Graph

289 Commits

Author SHA1 Message Date
Unknwon
613139e7be Enable Go modules (#5835)
* Remove vendor

* Enable Go modules

* ci: add command to fetch dependencies

* ci: update setting

* ci: update settings

* Require Go 1.11

* Rename module name to gogs.io/gogs
2019-10-23 23:03:17 -07:00
Unknwon
98114944fc vendor: update github.com/gogs/go-gogs-client
Bring fixes for #5538
2018-12-03 14:45:19 -05:00
Unknwon
77275a9b31 models: rename Id to ID 2018-08-16 20:26:09 +08:00
Unknwon
376a629c9f repo: add changes to repository avatar feature (#5221) 2018-06-17 22:18:41 +08:00
Unknwon
53c8e4263b models: skip JSON for fields skipped by XORM
Reduce output JSON size by backup command
2018-06-09 16:06:47 +08:00
Unknwon
aff4208244 *: rename "gogits" to "gogs" 2018-05-27 08:53:48 +08:00
Unknwon
01ccc2cc96 security: prevent same passcode from being reused
Reported by @cezar97.
2018-05-21 14:24:06 +08:00
Unknwon
a855abf8c0 models: rename RewriteAllPublicKeys -> RewriteAuthorizedKeys 2018-03-30 01:26:36 -04:00
Sb
ab2c6cb008 models: fix #4692 and typo in comments (#4695) 2017-08-13 02:11:48 -04:00
Unknwon
e02fac4968 repo: fix panic on pull request submit (#4572) 2017-07-14 18:51:23 -04:00
Unknwon
0e6a6bf880 Refactoring: remove sessionRelease()
XORM supports automatic roll back in session Close() already.
2017-06-11 03:06:36 -04:00
Unknwon
ce6e8ed8fe models: remove redundant tags for primary keys 2017-05-21 04:36:41 -04:00
Unknwon
a11044f789 locale: sync from Crowdin 2017-05-17 18:37:25 -04:00
Unknwon
9e3c83372f api/repo: improve migration error handling 2017-04-07 16:00:25 -04:00
Unknwon
90b9f7e08c pkg/setting: rename {AppUrl, AppSubUrl} -> {AppURL, AppSubURL} 2017-04-06 17:27:57 -04:00
Unknwon
0e271799f2 Refactoring: rename and simplify pkg/tool functions 2017-04-06 17:13:53 -04:00
Unknwon
a617d52374 2fa: initial support (#945) 2017-04-06 00:14:30 -04:00
Unknwon
6fbb984ebf Refactoring: rename pkg/base -> pkg/tool 2017-04-05 09:05:40 -04:00
Unknwon
d05395fe90 Refactoring: rename modules -> pkg
Reasons to change:

1. Shorter than 'modules'
2. More generally used by other Go projects
3. Corresponds to the naming of '$GOPATH/pkg' directory
2017-04-04 19:29:59 -04:00
Unknwon
bd1e757350 user: remove sanitizer for FullName (#1937) 2017-03-23 20:24:02 -04:00
Unknwon
0ccd7c97ab models: rename ErrUserNotExist -> errors.UserNotExist 2017-03-16 17:18:43 -04:00
Unknwon
05dbd3f7d7 refactoring: experimental with models/errors package 2017-03-12 00:47:34 -05:00
Unknwon
22882d7c04 models/user: explicitly select for organization type 2017-03-10 12:31:50 -05:00
Unknwon
bab448681d models/user: handle case when user doesn't belong to any organization (#4258) 2017-03-08 22:21:31 -05:00
Unknwon
bb005f3f9a models/user: better directory handling when change username
Previously, if the user base directory somehow doesn't exist, the
application throws 500 for failure of rename.

Now it detects if the application should rename or just create a
new directory.
2017-03-07 14:12:19 -05:00
Unknwon
ebd95dd082 models/org: reduce to 2 SQL executions for GetOrgIDsByUserID
This also addresses #4231. It is now ignoring nonexistent
organizations returned from 'org_user' table.
This was a bug caused in older version that didn't cleanup
'org_user' table when delete an organization.
2017-03-03 18:26:51 -05:00
Unknwon
b78e03934d models/access: hasAccess only need userID not user object 2017-02-23 16:15:25 -05:00
Unknwon
266586e866 repo: assignee can be anyone who has read access (#3739) 2017-02-17 22:17:27 -05:00
Unknwon
b481927d5e Improve error handling 2017-02-17 18:23:35 -05:00
Unknwon
0958fe5a4e Improve Open Graph Meta tags (#3664) 2017-02-11 00:03:10 -05:00
Unknwon
b67ec01d41 Able to disable non-admin to create new organization (#1556)
Add new config option '[admin] DISABLE_REGULAR_ORG_CREATION', by
default it's 'false'.
2017-02-10 16:41:51 -05:00
Unknwon
eb66060cd7 log: start using gopkg.in/clog.v1 2017-02-09 19:29:59 -05:00
Renato P. de Aquino
ec5a967937 Issue #3814 (#3903) 2017-01-30 08:35:12 -05:00
Denis Denisov
84f28fc5d6 Safe compare password (timing attack) (#4064) 2017-01-28 13:28:52 -05:00
Unknwon
ae319da5fd Disable local path migration by default (#4033)
Site admin now has to enable manually by config option
[repository] ENABLE_LOCAL_PATH_MIGRATION = true.
Site admin always grants this permission, but regulars users have
to be allowed by site admins in admin user panel.
2017-01-26 17:43:37 -05:00
Unknwon
8059175a5c Fix dashboard issues/pull request counting 2016-12-27 22:01:18 +08:00
Flare
952e510dfa Added public entries to reserved keywords list
Closes #3728
2016-12-21 19:24:23 -05:00
Unknwon
67380cf47b Minor code fix 2016-12-21 04:08:23 -05:00
leonklingele
7cb440273c Don't use custom PBKDF2 function (#3952)
Instead, use golang.org/x/crypto/pbkdf2
2016-12-21 03:42:44 -05:00
leonklingele
d96f2a7184 Fix random string generator (#3953)
* Remove unused custom-alphabet feature of random string generator

* Fix modulo-biased random string generator

* Random string generator should return error if it fails to read random data via crypto/rand
2016-12-21 03:41:37 -05:00
Unknwon
c50d59874d #3577 incorrect URL produced by AvatarLink 2016-09-01 12:36:26 -04:00
Unknwon
99c2ae7b35 #3515 use alert instead 500 for duplicated login source name 2016-08-31 00:56:10 -07:00
Unknwon
c30b856d14 #3505 use user’s info for committer and author 2016-08-27 13:37:55 -07:00
Unknwon
3f7f4852ef #2246 fully support of webhooks for pull request 2016-08-14 03:32:24 -07:00
Sandro Santilli
90dd0657b5 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
ec92565f23 #3393 fix missing sub-url prefix in relative avatar link 2016-08-07 10:13:05 -07:00
Unknwon
50422f1fc2 #3348 always use relative avatar link in the template 2016-08-05 12:12:54 -07:00
Unknwon
2d76de2574 #3281 fix x.Iterate returns nothing inside session scope with SQLite3 2016-07-26 17:26:48 +08:00
Unknwon
e74630ae3b #1384 add pagination for repositories 2016-07-24 14:32:46 +08:00
Unknwon
1f2e173a74 Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00