Commit Graph

276 Commits (master)

Author SHA1 Message Date
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
Unknwon 46e96c008c Use struct for UI settings 2016-07-24 00:23:54 +08:00
Unknwon 250be011c7 Remove redundant Unix timestamp method call
Unix() already uses UTC as timezone
2016-07-23 20:24:44 +08:00
Unknwon 69f5308761 #2903 use different reversed words and patterns for repository and user 2016-07-23 18:58:18 +08:00
Dennis Chen 6488ee12be avatar: make custom and generated avatars equal (#3301)
Sets all avatars to use PNG image format.
Keeps avatars consistent at 290x290px resolution.

Signed-off-by: Dennis Chen <barracks510@gmail.com>
2016-07-21 15:31:14 +08:00
Unknwon c083d76567 #2937 able to prohibit user login 2016-07-16 10:22:16 +08:00
Unknwon 52322ef624 models/user_mail: refactor EmailAddress 2016-07-16 10:08:04 +08:00
Sandro Santilli a4ea3bd015 Return avatar link as absolute url (#3235)
Fixes relative urls coming from api/v1

See https://github.com/drone/drone/issues/1701
2016-07-16 08:19:30 +08:00
Sandro Santilli 8a248696e9 Use a gopher as default avatar (rather than the gravatar logo) (#3208)
Also changes the avatar from a jpeg to a png, to allow for
transparent background. The indexed png is also smaller in size.

Note that at the moment the default avatar is only used when
the user requested a custom avatar and the custom avatar file
is not found (should never happen).

In the future the default avatar could be used as a default
return when by-mail avatar lookups fail too (both gravatar
and libravatar support passing a default)
2016-06-27 18:12:30 +08:00
Unknwon ff731ea07d #2814 LOWER() column value within search 2016-03-16 16:55:19 -04:00
Odin Ugedal 6ccb2d36cf Remove email from user search 2016-03-15 19:44:58 +01:00
Odin Ugedal 3253e3c5aa Make user search look in username, name and email
Make user search function look in username (lower_name), full name
(full_name) and primary email (email). This will benefit searching after
user in "explore", admin panel and when adding new collaborators.
2016-03-15 14:16:58 +01:00
Unknwon 263304b6b7 #13 fix postgres aggregate 2016-03-11 16:11:33 -05:00
Unknwon 2bf8494332 #13 finish user and repository search
Both are possible on explore and admin panel
2016-03-11 15:33:12 -05:00