Commit Graph

607 Commits (086bfb8b4b655f46ac9471cbea9df70e912c315d)

Author SHA1 Message Date
Unknwon 7e9b42c87d code clean up
Unknwon 5077408d78 code cleanup and minor issue fix
Unknwon 042d350762 Fix only user has repo write access can comment
Thibault Meyer 6a81632e36 Fix typo CacheInternal -> CacheInterval ()
Unknwon c5d4a9e046 Add commit timestamp to webhook
Unknwon 15b0cbe318 update git-module require version
Unknwon bbe866122d fix regression of MustEnableIssues check
Unknwon b73318bc62 Fix 404 when comment on pulls and not using interal issue tracker
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
Unknwon ab9c5fb5e7 allow render raw content
Use URL query parameter render=1 to render content in raw mode.
Unknwon 2f105f3979 completely disable builtin issue tracker when enable external tracker
Unknwon e7fd65f0cf better code structure and batch minor improvements
Unknwon 899e799459 support delete issue comment
Unknwon 1f2e173a74 Refactor User.Id to User.ID
Unknwon ae88d76032 Bump version
Unknwon e3d3d424b2 Minor fix for go vet
Unknwon f1b8d52eb3 fix no mail notification when issue is closed/reopened
Unknwon a752f09055 validate username attribute fetched from LDAP
Unknwon de10387f41 bump git-module requirement
Unknwon 1faaaeb3d9 Update glide.lock
Unknwon 7938506e07 update git-module require version
Unknwon 73b4acbb63 Update glide.yaml
Unknwon a4eaddff81 Update dep version
Alex Myasoedov 84d9aff8a2 gogs dump tempdir flag ()
Unknwon 7826eae452 fix DEPRECATED Action signature erorr
Unknwon 60ae8ac3d2 Add route for
Unknwon 9bd9ad4205 add CRUD issue APIs
- Fix go-gogs-client#10
- Related to 
Unknwon dd6faf7f9b Convert all API handers to use *context.APIContext
Unknwon b4f47a7623 attempt to fix invalid csrf token
Unknwon d733efc1cc Alpha support for custom templates
No guarantee for compatibility with future changes
Unknwon f76d821bda fix
Unknwon 2bf8494332 finish user and repository search
Both are possible on explore and admin panel
Unknwon 514382e2eb Rename module: middleware -> context
Unknwon 58f0c68151 Some minor changes
Unknwon 12b5a76b0d Minor fix for
Tamás Molnár 9c91e27933 Added: Ability to delete org avatar.
Unknwon a5b0400be7 finish new access rights for collaborators
Unknwon 045f14fbd0 finsih UI work for access mode of collaborators
Collaborators have write access as default, and can be changed via repository
collaboration settings page to change between read, write and admin.
Unknwon a2f13eae55 some avatar setting changes
- Allow to delete current avatar
Unknwon 2d2d85bba4 support pull requests in same repository
Unknwon 9df6ce48c5 Minor fixes for
Josh Frye 2f228ddf31 Update delete wiki page route
Josh Frye 1ca171dbe9 Add ability to delete single wiki pages.
Unknwon 9e89584cb4 Allow setting git operations timeouts
- Migrate:  
- Clone: 
- Mirror, Pull
Unknwon 8055a0bdac Post work for
Improve test cases, config settings, also show SSH config settings on admin config panel.
Unknwon baaf6046a1 Minor fix for
Josh Frye c27038e392 Test mailer button. Addresses
Unknwon 72ce06eab8 fix missing slash for go-get meta
Unknwon 912f7b51e9 add actions for close and reopen issues
Unknwon c9516c4c60 Fix wrong place to check disable SSH
Unknwon ac78bae7b5 Replace uuid module with original package
Unknwon 7140dbac95 Fix
Unknwon 2408df3f35 Merge pull request from Download-Fritz/MirrorForks
 Allow to fork and disallow to create PRs for mirrors.
Download-Fritz a1b28fc33c Rename MustEnablePulls() to MustAllowPulls() and simplify the contained check to AllowsPulls().
Unknwon 338af89d56 fix possbility that use email as pusher user name
Remove the possibility of using email as user name when user actually push
through combination of email and password with HTTP.

Also refactor update action function to replcae tons of arguments with
single PushUpdateOptions struct.
And define the user who pushes code as pusher, therefore variable names shouldn't
be confusing any more.
Unknwon ccc94dd11c fix panic on pushing repositor
Unknwon 9cf4fe043b Add env var check for update
Unknwon 58e004f7da Remove cache avatar support and add its tests
Unknwon 9adfe453d5 delete repo local copy when transfer
Remote repository path is renamed but does not delete
outdated local copy which still has old repository path
as remote.
Josh Frye 8662990746 Add default branch to repo payload
Josh Frye 47adc0e8f7 Bump git-module. Fixes
Unknwon 739d5aa1d3 Merge pull request from fnkr/hide-other-teams-repos-from-org-page
Hide other teams & repos from organization page
Florian Kaiser 71bb7f6053 Escape unescaped periods in route regular expression
Florian Kaiser e35791b2b2 Only show teams the user has access to
Unknwon ee814bf8d6 minor fix for sr on dashboard
Unknwon db719abff2 stop compile bindata for TRANSLATORS
- update required version of git-module for 
Unknwon e0f0f72a36 disallow access of some pages for empty repo
Unknwon cc22c8a1ae update dep lib version requirement
Unknwon a62290de52 improve HTTP auth error message
Unknwon 85af36332b fix utf-8 recognized as windows-1252
Unknwon a49af93faf APIs: Users Followers
- User profile un/follow
- List user's followers/following
Unknwon f00fef0cd0 show commits count in PR tabs
Unknwon 9cd16c5b12 add organization APIs
Unknwon 8ecbf0f16d fix
Unknwon 19423957b1 rename import path
Unknwon 3362b3a44f fix possible disclosure
Unknwon 50264200f0 fix huge diff hangs
Unknwon 7509fa2c33 improve get commits performance
Unknwon 79dcd7ee6e able to identify git version on Windows
Unknwon 59c965a5ec admin able to edit organization max repo creation
Unknwon 477b4d3b50 fix form submit error
Unknwon 2a0bb1fa90 Limit repo creation
Unknwon 9a2e43bff2 move out git module and send push hook
Adam Strzelecki e4a092fb5a Make serv/update use LOCAL_ROOT_URL instead public
The reasoning for that is in the previous commit.
Unknwon 4e0c697aaf force new INI version
Unknwon ca8ce793d1 Ability to delete repo from admin panel
Unknwon 404867f206 fix and fix
Unknwon f3eaa4c592 Set default language for i18n
Unknwon f41360d864 advanced select ops for system notices
Unknwon e538ff2770 fix and fix
Unknwon 56dd430a10 refactor API routes and some work for
Unknwon 5742f9fe69 fix
Unknwon cc8f5add6e fix
Unknwon ec2423ad7c more UI minor fixes
Adam Strzelecki 2580e7b57e UI: Always show menu on repo pages
Merges repo/sidebar.tmpl with repo/header.tmpl and makes every repo page use
middleware.RepoRef() necessary to display information on this menu.
Unknwon 0be8b1b1a1 Ability to batch delete system notices
Unknwon dcb391d341 Merge branch 'feature/wiki' into develop
Unknwon 830d000667 finish wiki
Unknwon 5a14c3cf98 Merge pull request from kakwa/develop
various fixes in gogs dump command
Unknwon 9950f5a5bd add line break after SSH error message
kakwa 1d7a1b6034 add name of the dump file in last log message
kakwa a59b1fcc21 Fix dump of log and custom directory in dump cmd
Now, the dump cmd uses setting.CustomPath and setting.LogRootPath
instead of setting.WorkDir which was kind of broken if the gogs
binary was in a different directory than gogs data.
Additionally, the backup of setting.CustomPath directory is only done
if it exists.
kakwa c5a9be9115 Using a tmp dir to generate db and repo dumps
Using a tmp dir makes gogs dump more robust to concurrent runs.

It also permits an easier cleaning of the tmp files (gogs-db.sql and
gog-repo.zip) by just removing the tmp dir.

As a side effect, it partially fix bugs on workdir.
Previously, 'gogs dump' created the archives in the current directory,
and tried to include these archives from the directory where the
gogs binary lies.
ex: if gogs binary is in /usr/bin/gogs, and gogs dump is run from /tmp/,
/tmp/gog-repo.zip is created, but gogs dump tried to include
/usr/bin/gogs-repo.zip.
kakwa f86afb04a2 Adding more error handling in dump cmd
The dump cmd did not check the return value of the z.AddFile or
z.AddDir when building the final archive.
It caused the dump command to succeed even if an error occurred.
The resulted dump archive could be corrupted/empty.
(errors could be various: removal by a concurrent process, disk full,
bugs in the dump cmd itself)
Unknwon e42fcb033d wiki: finish edit
Unknwon 392f3ee210 wiki: finish new
Unknwon c50a3503e6 introduce git-shell
Unknwon 2b10fdc4dc Wiki: UI for page new
Unknwon 3ca544912f Drop /org/ URL path prefix in organization home page
Unknwon 21ad4bf0fe print error log to client side when dev mode
Unknwon 0128036514 some fixes for builtin SSH server on Windows
Unknwon 52c8f69163 fix
Unknwon 987dcc5372 fix
Unknwon f455125d4d fix
Unknwon 29ed7872f8 repo sidebar active class
Unknwon 5dc3dd1704 fix
Unknwon 134d8e7681 work on
Unknwon e030109b5a fix api broken
Unknwon 7c80eba77f minor UI fix and fix ssh race
Unknwon 1d57f0d64f Show custom avatars in commits
Unknwon 2db785b3ed convert missing name
Unknwon 647688bd06 convert name to lower when handle SSH
Unknwon 18c841050b fix 1540 and experimental SSH server support
Unknwon b55499d039 go vet and fix
Unknwon 676d774d88 fix
Unknwon f255b1e86d fatal when no needed update task
Unknwon a374751eb8 add Makefile
Unknwon b9f5def5dc fix insecure tls when trigger task
Unknwon 0fbb8c8826 New push to head repo of head branch: regenerate patch and retest apply
Unknwon b5fdf0947b reduce code
Unknwon 35a65736fa add get repo API
Unknwon 932dbccb67 fix import path, fix
Unknwon aff49b1c9e unified API error response
无闻 b1941f1da1 Merge pull request from soudy/develop
Added repository remove option to API
Unknwon db00aa7653 add log for trigger hook when push through SSH
Steven Oud 6fe868a4d5 added repository remove option to api
kendaru b05c7b3faa moved routes to RouterRef group
kendaru 5c39d3fa7d changed integrated page number to GET
Steven c8aa9c6cb1 implemented : see users who forked/starred/watched a repository
Unknwon e787e73e2f fix URL match
Unknwon 3fb1b6a608 drop oauth2 feature support
Unknwon e75fd2f783 simplify names
Unknwon e5ed5904c6 GUI bug while adding ldap user
Unknwon 121a81a2c5 finish new edit auth UI
Unknwon 52ec80fa18 finish all new user settings UI
Unknwon 5020576e80 minor regexp fix on
Unknwon 56eb252098 fix repo name router bug
Unknwon c38754d432 allow upload avatar for org
Signed-off-by: Unknwon <u@gogs.io>
Unknwon 6a5c87afdd prepare 0.6.9 release
Unknwon 7ec991326d fix migrate api
Unknwon e5b105e513 fix migrate API
Unknwon 83dc2468f5 finish initial version of pull request
Unknwon d951824ff9 able to download archive by API
Unknwon 953bb06857 basic PR feature
Unknwon 37e0cee877 finish PR UI
Unknwon 8c046073a8 work on PR conversation
Unknwon c08600c59b new edit webhook UI
Unknwon 4217c2333c new create webhook UI
Unknwon 2881456421 new webhooks list UI
Unknwon 1cb03135b7 new repo git hooks UI
Unknwon a329bbc215 new org dashboard issues
Unknwon 062adbed8a add confirmation to delete ssh key
Unknwon 371572cf5f allow edit issue and comment
Unknwon 87f5ca8e1f able edit issue title
Unknwon 1453e91f41 minor fix on API response
Unknwon 54b52de6ee minor fix on API response
Unknwon 47ac579f09 only assign auto-admin when sign up by web
Unknwon 4c7b6414eb new access token UI
Unknwon 2493454587 new delete account UI and password confirmation
Unknwon 81b8427438 new UI on admin/monitor
Unknwon 6fdc881bd4 detect kill signal
Unknwon 30b428bf0e : 500 when visit a issue with issue/comments of deleted user
Unknwon cec38f2a8c able edit issue labels/milestone/assignee
Unknwon 133b19d0c5 finish view comments on issue page
Unknwon b410207dc1 add cache-control for attachments
Unknwon e67659bf8e fix serve attachment content type
Unknwon 34f6cbfc2a finish attachments when create issue
Unknwon 89c2bd4a0d finish create issue attachment UI
Unknwon 590c464c56 UI: create issue with title and content
Unknwon dea3a8c6a4 WIP: create PR - choose branch
Unknwon 9db4acc62e improve fork process
Unknwon 3d0583df0f fix private repo cannot trigger hook by SSH
Unknwon 9d414d4dd9 remove Index field of milestone
Unknwon 952c480f4f better version checker
Unknwon 39a3b768bc : Add Deployment Key Support
Unknwon 2c507667bf Merge branch 'develop' of github.com:gogits/gogs into feature/milestone
# Conflicts:
#	gogs.go
#	models/issue.go
#	templates/.VERSION
Unknwon 0705f55ce0 finish new milestone page
Unknwon 74bd6b939c milestone: edit
Unknwon e50982f5ec allow anonymous SSH clone
Unknwon 9311a9858a milestone: pagination
Unknwon 04458d49a0 milestone: list view
Unknwon cc0d963f75 fix check template version
Unknwon bdd92dc7d1 fix disable router log option
Unknwon 4cd892c99f fix
Unknwon ba47306a69 fix
Unknwon fa298a2c30 : Realtime webhooks
Unknwon 54b58e988d Merge branch 'develop' of github.com:gogits/gogs into feature/page_issues
Unknwon 70d44e9565 Merge branch 'master' of github.com:gogits/gogs into develop
无闻 57651060ce Merge pull request from technosophos/master
Fix minor spelling issues.
无闻 6272986192 Merge pull request from nice-software/wip/certCommonName
Add CommonName to the self signed certificate
Unknwon ac95f6d50f UI: basic label list
- create new label
Unknwon 86dbda0b42 UI: basci issue list without filters
- fix isRead check
- fix paging
Unknwon ff051e2106 : API calls are not hidden behind sign in
Paolo Borelli e94ca36335 Add CommonName to the self signed certificate
Without a CN the self signed certificate is considered
invalid by chrome.
You can check with: openssl x509 -in cert.pem -subject -noout
Matt Butcher d82d9bc153 Fix minor spelling issues.
Luka Dornhecker 1988c0993d remove extra space in ssh authentication message
Unknwon 27c3c5415f Anyone can see organization pages even without logging in when sign in required
Unknwon e6cf83b8c0 Put default config into binary
Unknwon 8e815abeb0 : Custom robots.txt should be send with plaintext content-type
Unknwon 33894591a6 : Edit Account does not take into consideration password rules
Unknwon 588f3215c6 : dashboard no longer accessible when repo is missing
Unknwon b447d18dca cmd/serve.go: remove useless code
Unknwon d446be9f5f models: mirror fix on
Peter Smit 556881964f Merge branch 'access' into access_rewriteserv
Unknwon 10e4b5b6c6 Merge branch 'access' of github.com:gogits/gogs into access
Unknwon 7ccab9cd09 Merge branch 'dev' of github.com:gogits/gogs into access
Conflicts:
	gogs.go
	models/models.go
	models/user.go
	templates/.VERSION
	templates/org/home.tmpl
Unknwon 059338139c routers: able to migrate repo from local path
- modules/middleware/context.go: add HandleAPI method
无闻 fc4dff1b17 Merge pull request from phsmit/access_update
Updating context and fixing permission issues
Peter Smit aa68e86206 Rewrite/simplify gogs serve
Peter Smit ed89b39984 Updating context and fixing permission issues
The boolean flags in the repo context have been replaced with mode and two methods

Also, the permissions have been brought more in line with https://help.github.com/articles/permission-levels-for-an-organization-repository/ , Admin Team members are able to change settings of their repositories.
Peter Smit f9454cc32c Make sure that a mirror can't be written to by http or ssh
Unknwon 685ed1f807 models: fix XORM API break
cmd/web.go: check version after load config
Unknwon 6d0f3a07d4 code fix caution: undertest
Peter Smit 6c1ee384f1 Merge remote-tracking branch 'mine/access_refactor' into access_refactor
Conflicts:
	cmd/serve.go
	models/access.go
	models/migrations/migrations.go
	models/org.go
	models/repo.go
	models/user.go
	modules/middleware/org.go
	modules/middleware/repo.go
	routers/api/v1/repo.go
	routers/org/teams.go
	routers/repo/http.go
	routers/user/home.go
Peter Smit 0a4cda0dd4 Refactoring of the Access Table
This commit does a lot of the work of refactoring the access table in a table with id's instead of strings.

The result does compile, but has not been tested. It may eat your kittens.
Unknwon 7e7160eefd first pass work on migration
Peter Smit 0d158e569b Change constants to UPPERCASE_WITH_UNDERSCORE style
Peter Smit b7e26aa5e3 Improve argument parsing for serve command
Unknwon f15fa9167a cmd: code fix for
- routers/admin: add rewrite update hook operation
- conf/locale: update locale file due to ini behavior changes
- cmd/cert_stub.go: remove useless code
- cmd/fix.go: no longer need fix command(at least now)
无闻 cd0ee35b3f Merge pull request from phsmit/conf_on_cli
Add option to provide configuration file on command line
Unknwon 2a2596fe61 able to disable SSH for
Peter Smit 4e79adf6b5 Refactoring of the Access Table
This commit does a lot of the work of refactoring the access table in a table with id's instead of strings.

The result does compile, but has not been tested. It may eat your kittens.
Peter Smit 1ab09e4f1b Add option to provide configuration file on command line
Unknwon 4dfffee9fb cmd: update csrf version requirement
Unknwon 0a2068d7fb models: code fix on
Unknwon 89ea3e1acc routers: save partial config when install
Unknwon b293b6eaa6 cmd: CMD option for port number of `gogs web` to prevent first time run conflict
- routers: use new binding convention to simplify code
- templates: able to set HTTP port number in install page
Unknwon 7170011f4d update with deps
Unknwon 13e35398aa prepare for mirror update release
Unknwon d5c6b53571 use new Redis client
Unknwon f0ca16d78f add cache version require
Unknwon c73e9057ae Optmize git-fsck options and fix
Unknwon 0f1ff9b1ad fix cache dep API broken
Unknwon 63c1f9a23f fix 500: E-mail already used in user settings page
Unknwon 81a44e4cd0 fix API changes
Unknwon 97b39ae2e4 fix invite bug(shouldn't include full name to search box)
Unknwon 79537467da mirror fix and update
无闻 a18decf4cc Merge pull request from phsmit/multiple_emails
Multiple emails
Unknwon b231b8c927 update locale and mirror code format
Peter b033f2f535 Finish method for having multiple emails/user.
All basics are implemented. Missing are the right (localized) strings
and the page markup could have a look at by a frontend guy.