2
0
Commit Graph

1489 Commits

Author SHA1 Message Date
Bwko
ae5d868288 Add option to app.ini to enable local import paths (#724) 2017-01-23 09:19:50 +08:00
Bwko
e2ace992cf Add a reserved path check to the wiki (#720) 2017-01-22 23:08:54 +08:00
Lunny Xiao
f038ff88b4 fixed bugs on Wiki and resolved #667 (#674) 2017-01-21 20:50:51 +08:00
Philip Couling
e5f3401b18 Spun attachments into seperate go file (#701)
Moved attachments into seperate go file
2017-01-20 07:58:46 +01:00
Ethan Koenig
a42a9c1da1 Fix permission bugs in team API (#647) 2017-01-20 13:16:10 +08:00
Ethan Koenig
39f1be75c3 API Endpoints for organization members (#645) 2017-01-20 10:31:46 +08:00
Matthias Loibl
2a2abca584 Refactor process package and introduce ProcessManager{} with tests (#75)
* Add a process.Manager singleton with process.GetManager()

* Use process.GetManager everywhere

* Fix godoc comments for process module

* Increment process counter id after locking the mutex
2017-01-17 13:58:58 +08:00
Andrew
b7b9210c46 Two factor authentication support (#630)
* Initial commit for 2FA support

Signed-off-by: Andrew <write@imaginarycode.com>

* Add vendored files

* Add missing depends

* A few clean ups

* Added improvements, proper encryption

* Better encryption key

* Simplify "key" generation

* Make 2FA enrollment page more robust

* Fix typo

* Rename twofa/2FA to TwoFactor

* UNIQUE INDEX -> UNIQUE
2017-01-16 10:14:29 +08:00
Philip Couling
ba108352be Attach to release (#673)
* Moved attachaments POST url from /issues/attachments to /attachments

* Implemented attachment upload on release page

* Implemented downloading attachments on the release page

* Added zip and gzip files to default allowed attachments

* Implemented uploading attachments on edit release

* Renamed UploadIssueAttachment to UploadAttachment
2017-01-15 22:57:00 +08:00
btrepp
d6f9d20875 Removes reliance on server specific SQL (#393)
Breaks the retrieval of repositories into two queries
This fetches the paged ids in one go, then the
actual repository information in a second query

Some databases do not support SELECT with *
when group by is used.
2017-01-14 22:32:36 +08:00
Ethan Koenig
d7038d446c Fix ambiguity bug in getCommentsByRepoIDSince (#665) 2017-01-14 10:21:30 +08:00
Ethan Koenig
255d466809 Bug fixes for webhook API (#650) 2017-01-14 10:14:48 +08:00
Lunny Xiao
214c6c2e56 bug fixed for update repository (#664) 2017-01-14 10:07:04 +08:00
Andrey Nering
17b9742a82 Notifications: mark as read/unread and pin (#629)
* Use relative URLs

* Notifications - Mark as read/unread

* Feature of pinning a notification

* On view issue, do not mark as read a pinned notification
2017-01-12 12:27:09 +08:00
Bo-Yi Wu
c4094b4df2 refactor: Add new deleteOrg func. (#633) 2017-01-11 21:10:43 +08:00
Ethan Koenig
7aafb3dc1f Unit tests for models/admin 2017-01-09 21:49:51 +01:00
Ethan Koenig
39c8772cc8 Better coverage in pull_test (#615) 2017-01-09 11:15:07 +08:00
Ethan Koenig
2e8fe6f573 Better coverage and TODOs for update_test (#616) 2017-01-09 11:14:57 +08:00
Ethan Koenig
d36428e981 Unit tests for models/action (#619) 2017-01-09 11:08:36 +08:00
derSuessmann
59bc880e0d Add Keep email private (see issue #571). (#571)
- Add site-wide option DEFAULT_KEEP_EMAIL_PRIVATE.
- Add the new option to the install and admin/config pages.
- Add the new option to app.ini in the service section.
- Add the new option to the settings struct.
- Add English text strings to i18n.
- Add field KeepEmailPrivate to user struct.
- Add field KeepEmailPrivate to user form.
- Add option to UI.
- Add using noreply email address if user has "Keep Email Private".
An email address <LowerName>@<NO_REPLY_ADDRESS> is now used in commit
messages (and hopefully all other git log relevant places). The
change relies on the fact that git commands should use
user.NetGitSig().
- Add hiding of email address in UI, if user has set "Keep Email Private".
- Add condition to show email address only on explore/users and user
pages, if user has not set "Keep Email Private".
- Add noreply email in API if set "Keep Email Private".
- Add a new service setting NO_REPLY_ADDRESS. The value of this
setting is used as the domain part for the user's email address in
git log, iff he decides to keep his email address private.
If the user decides to keep his email address private and this
option is not set 'noreply.example.org' is used, which no MTA
should send email to.

Add NO_REPLY_ADDRESS to conf/app.ini.
2017-01-08 11:12:03 +08:00
Ethan Koenig
e868bb82bd Unit tests for models/access.go (#606) 2017-01-08 11:10:53 +08:00
Ethan Koenig
47d2b91f76 API endpoint for subscribers (#598) 2017-01-07 11:13:02 +08:00
Andrey Nering
fd8165bbc4 Merge pull request #555 from ethantkoenig/tests/pull
Unit tests for models/pull.go
2017-01-06 19:19:18 -02:00
Andrey Nering
df3a195814 Create missing database indexes (#596) 2017-01-06 23:14:33 +08:00
Ethan Koenig
85b408be4b Unit tests for models/pull.go 2017-01-06 10:08:23 -05:00
Ethan Koenig
209bf52ade API endpoint for stargazers (#597) 2017-01-06 15:05:09 +08:00
Lunny Xiao
4875240bbc Make releases faster than before and resolved #490 (#588)
* make releases faster than before and resolved #490

* fix comment
2017-01-06 09:51:15 +08:00
Andrey Nering
e6244366cd Merge pull request #539 from andreynering/notifications-step-2
Notifications - Step 2
2017-01-05 11:53:01 -02:00
Ethan Koenig
8103d4b5c7 Fix SQL bug in models/access (#583)
Previously got a 'relation repo_access does not exist' error in User_GetRepositoryAccesses
2017-01-05 08:57:54 +08:00
Berk Demirkır
ff369ac504 Check primary email address fields on CreateUser (#556)
* Check primary email address fields on CreateUser

As this check wasn't available, uid=1 (and possibly guests too, if registration is open) is able to register new users with existing email addresses. This leads to numerous 500 errors.

* Update user.go

* Lower the email first. Then check
2017-01-05 08:52:20 +08:00
Ethan Koenig
439ab34752 Fix typos in models/ (#576) 2017-01-05 08:50:34 +08:00
Andrey Nering
690fa98560 Add pagination for notifications 2017-01-03 17:09:36 -02:00
Lunny Xiao
1420a613ed fix bug #564 (#567) 2017-01-03 16:27:11 +08:00
Lunny Xiao
18a88b582a Update xorm and dependencies vendor for feature to dump to other database (#565)
* update xorm and dependencies vendor for feature to dump to other database

* fix golint
2017-01-03 16:20:28 +08:00
Kjell Kvinge
150da78704 Fix benchmarktests (#557) 2017-01-03 10:52:09 +08:00
Lunny Xiao
56cb67b4cc change the default action when deleting a release to not delete tag 2017-01-03 02:27:38 +01:00
Ethan Koenig
a28c58faae Release API endpoints 2017-01-02 00:10:52 +01:00
Lunny Xiao
1110101591 resolved #485: when migrate empty wiki repo, then ignore (#541) 2016-12-31 17:34:34 +08:00
Ethan Koenig
49b4b17b91 Unit tests for token and update models 2016-12-31 10:17:45 +01:00
Schwobaland
d8821eec53 Restrict creating organisations by user (#193)
* restrict creating organizations based on right on user

* revert bindata.go

* reverse vendor lib

* revert goimports change

* set AllowCreateOrganization default value to true

* revert locale

* added default value for AllowCreateOrganization

* fix typo in migration-comment

* fix comment

* add coments in migration
2016-12-31 10:33:30 +08:00
Bo-Yi Wu
f559cae3a5 fix gofmt error
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-12-30 20:41:10 +01:00
Andrey Nering
36f6f4309c Notification - Step 1 (#523)
* Notification - Step 1

* Add copyright headers

* Cache issue and repository on notification model
2016-12-31 00:44:54 +08:00
typeless
4d0b4eae26 Speed up conflict checking in pull request creation (#276)
* Speed up conflict checking in pull request creation

In order to check conflicts of a PR, we set up a working tree by
cloning the base branch, which is quite time-consuming when the repository is huge.
Instead, this PR uses `git read-tree` and `git apply --check --cached` to check conflicts.

For #258

* Use $GIT_INDEX_FILE instead of --index-output to avoid lockfile problem

The lockfile gets renamed to the final destination after the operation
finishes. But it must be located in the same filesystem, which prevents
us from using /tmp.

* Temporary file names should not prefixed with '-'
2016-12-29 22:59:52 +08:00
Andrey Nering
e99d70c178 Tab on user profile to show starred repos (#519)
* Tab on user profile to show starred repos

* Make golint happy and use transactions on StarRepo function

* x -> sess

* Use sess.Close() instead of sess.Rollback()

* Add copyright

* Fix lint
2016-12-29 22:58:24 +08:00
Lunny Xiao
f0dac53464 slight optimization for GetUserRepositories (#498) 2016-12-29 02:53:33 -06:00
Kjell Kvinge
a63f15664d commithgraph / timeline (#428)
* Add model and tests for graph

* Add route and router for graph

* Add assets for graph

* Add template for graph
2016-12-29 07:44:32 +08:00
Bwko
e2d858a6f7 Replace Gogs with Gitea (#520) 2016-12-28 16:33:21 +08:00
Lunny Xiao
c29e6f913d Optimization for user.GetRepositoryAccesses to reduce db query times (#495)
* optimization for user.GetRepositoryAccesses to reduce db query times

* fix missing cache
2016-12-28 09:34:35 +08:00
Lunny Xiao
c60ec2bc54 fix 500 when delete orgnization and resolved #486 2016-12-27 12:00:12 +01:00
Ethan Koenig
b1250ad531 API Endpoints for collaborators (#375) 2016-12-26 15:37:01 +08:00