Commit graph

22 commits

Author SHA1 Message Date
Martin Bornhold
2f34f8271c vcs: Use a thread scoped cache invalidation context to cache repository objects.
Without this change the cache is on a process scope. If running with multiple
threads this leads to sharing the cached object between threads. This will cause
exceptions if multiple threads are trying to access the same curl object.
Even worse it allows multiple threads to operate on the same repository object
concurrently.
2016-07-14 09:07:19 +02:00
Daniel Dourvaris
391379c4ab user: hash email key for User.get_by_email() fixes #4132 2016-07-28 09:19:07 +03:00
Martin Bornhold
0c7d0871b5 models: Use the new get_vcs_instance method to retrieve vcs instances. 2016-07-21 09:04:14 +02:00
Marcin Kuzminski
169a7c5cf1 integrations-db: don't use default contructor to be consisten with other modules
usage.
2016-07-14 11:23:46 +02:00
Daniel Dourvaris
efc1db0e2e integrations: use mutable json settings using json alchemy MutableObject. 2016-07-14 11:23:28 +02:00
Marcin Kuzminski
990143eae0 tokens: auth-token is not only for git/hg but also for svn.
Changed some docstrings to indicate this.
2016-07-13 12:34:17 +02:00
Daniel Dourvaris
d7cd766a07 integrations: fix bug where deleting a repo did not delete integrations 2016-07-12 11:14:40 +02:00
Daniel Dourvaris
7ff09cda95 integrations: add integration support
* added db migration for integration table, version 55
* added integrations views/templates/models
* added slack integration
* added h.url.current() support for pyramid only contexts
* added issues extractor for commit messages
* renamed repo-deleted/repo-created to repo-delete/repo-create
* removed marshmallow
* added serialization for events to static dicts of data
* added lazy_ugettext for translation of start time string
2016-07-10 06:43:20 +03:00
Daniel Dourvaris
23d7a947f5 events: add serialization .to_dict() to events based on marshmallow 2016-07-06 12:21:03 +03:00
Daniel Dourvaris
a9d0598239 scm: change update_commit_cache to check revision as well 2016-07-04 16:13:53 +03:00
Marcin Kuzminski
772de504bb encryption: Implement a slightly improved AesCipher encryption.
This addresses issues from #4036

- we use a backward compatible cipher that can implement HMAC signature
- with HMAC signature we can detected mangled data or wrong secret key
- this allows more explicit errors than UnicodeDecode errors
- added a new .ini values that controls strict mode
2016-06-27 19:26:03 +02:00
Marcin Kuzminski
0e916f338a user: indicate missing super admin or default as fatal errors. 2016-06-28 01:25:33 +02:00
Marcin Kuzminski
16a626ce44 refactor: renamed get_first_admin to get_first_super_admin which
reflects better what kind of user we're fetching.
2016-06-28 01:24:24 +02:00
Marcin Kuzminski
56c24af7bc caches: use optional identity cache options on get_by_repo_name and get_by_username
methods. Disabled by now.
2016-06-22 20:38:44 +02:00
Daniel Dourvaris
f43669f817 model: log exception if multiple repos rather than hard error 2016-06-22 18:29:41 +03:00
Daniel Dourvaris
114e4097ca model: make sure only 1 repo in session when get_by_repo_name 2016-06-22 18:18:59 +03:00
Daniel Dourvaris
6f322f3be9 speedup: join repo on fork/user/group by default 2016-06-22 14:58:05 +03:00
Daniel Dourvaris
c00cc3ef14 speedup: check identity_map when getting by repo name 2016-06-22 13:38:11 +03:00
Daniel Dourvaris
450bb8142e speedup: check local session for repo by repo name first 2016-06-22 12:53:43 +03:00
Johannes Bornhold
e756b3e5f4 hg: Log original exception when doing the merge with rebase. 2016-06-09 12:04:59 +02:00
Daniel Dourvaris
9354185a44 bugfix: fixed #3965 and updated a bunch of api tests which
were not actually testing their return values properly
2016-06-01 20:11:27 +03:00
Marcin Kuzminski
9a0d8c0b77 project: added all source files and assets 2016-05-24 15:56:53 +02:00