1
0
mirror of https://github.com/gogs/gogs.git synced 2025-05-08 00:20:58 +00:00

267 Commits

Author SHA1 Message Date
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 () 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 . 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 () 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 () 2017-02-11 00:03:10 -05:00
Unknwon
b67ec01d41
Able to disable non-admin to create new organization ()
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 () 2017-01-30 08:35:12 -05:00
Denis Denisov
84f28fc5d6 Safe compare password (timing attack) () 2017-01-28 13:28:52 -05:00
Unknwon
ae319da5fd
Disable local path migration by default ()
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 
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 ()
Instead, use golang.org/x/crypto/pbkdf2
2016-12-21 03:42:44 -05:00
leonklingele
d96f2a7184 Fix random string generator ()
* 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
incorrect URL produced by AvatarLink 2016-09-01 12:36:26 -04:00
Unknwon
99c2ae7b35 use alert instead 500 for duplicated login source name 2016-08-31 00:56:10 -07:00
Unknwon
c30b856d14 use user’s info for committer and author 2016-08-27 13:37:55 -07:00
Unknwon
3f7f4852ef fully support of webhooks for pull request 2016-08-14 03:32:24 -07:00
Sandro Santilli
90dd0657b5 Add support for federated avatars ()
* Add support for federated avatars

Fixes 

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 

* 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 fix missing sub-url prefix in relative avatar link 2016-08-07 10:13:05 -07:00
Unknwon
50422f1fc2 always use relative avatar link in the template 2016-08-05 12:12:54 -07:00
Unknwon
2d76de2574 fix x.Iterate returns nothing inside session scope with SQLite3 2016-07-26 17:26:48 +08:00
Unknwon
e74630ae3b 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 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 ()
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 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 ()
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) ()
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 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 fix postgres aggregate 2016-03-11 16:11:33 -05:00
Unknwon
2bf8494332 finish user and repository search
Both are possible on explore and admin panel
2016-03-11 15:33:12 -05:00
Unknwon
ad513a20e9 Replace time.Time with Unix Timestamp (int64) 2016-03-09 19:53:30 -05:00
Unknwon
13bd16af92 Minor fixes for 2016-03-06 13:24:42 -05:00
Tamás Molnár
9c91e27933 Added: Ability to delete org avatar. 2016-03-06 17:36:30 +01:00
Unknwon
a5b0400be7 finish new access rights for collaborators 2016-03-05 20:45:23 -05:00
Unknwon
a2f13eae55 some avatar setting changes
- Allow to delete current avatar
2016-03-05 00:51:51 -05:00
Unknwon
2d2d85bba4 support pull requests in same repository 2016-03-04 15:43:01 -05:00
Unknwon
d5a3021a7d Make markdown as an independent module 2016-02-20 17:10:05 -05:00
Unknwon
58e004f7da Remove cache avatar support and add its tests 2016-02-14 23:14:55 -05:00
Unknwon
f8182ac521 delete local wiki copy when rename repo and user 2016-02-05 14:11:53 -05:00