Commit graph

210 commits

Author SHA1 Message Date
lisaq
607fd8931d settings: fix #3944 add password reset permission 2016-10-25 17:37:14 +02:00
Daniel Dourvaris
f7d846560f ux: make 'no newline at end of file' message more pronounced in diffs 2016-10-25 17:24:56 +03:00
Daniel Dourvaris
12ebe4382a diffs: replace compare controller with new html based diffs:
* side/side + unified support
* redesign of diff changes/operations
* added button to see file before the change
* auto collapses large diffs

refs #4232
2016-10-19 14:29:51 +03:00
Daniel Dourvaris
af4ba1eff5 codeblocks: add new code token rendering function that
supports diff and normal tokens.
2016-10-19 10:37:07 +03:00
Martin Bornhold
a9a4e32eed subprocess: Change all imports from subprocess -> subprocess32 2016-10-14 09:37:44 +02:00
Marcin Kuzminski
62341a791b vcs: make the not initialiazed exception more meaningfull. 2016-10-18 23:22:12 +02:00
Daniel Dourvaris
8f4e395877 annotations: replace annotated source code viewer with renderer
to allow soft wrapping of lines and viewing of annotation message
2016-10-12 18:55:18 +03:00
Daniel Dourvaris
323c951802 vcs: add equality testing for commits against non commits to allow
commit == None functionality
2016-10-13 13:30:06 +03:00
Martin Bornhold
10181aa8e6 vcs: Send custom repo-locked status code to the VCSServer. 2016-10-10 16:07:15 +02:00
Martin Bornhold
add98db605 vcs: Add a comment about removing some code when dropping Pyro4 support. 2016-10-10 14:06:26 +02:00
Martin Bornhold
d3b91c664e vcs: Include reason phrase from VCSServer into HTTP status string. 2016-10-10 13:58:52 +02:00
Martin Bornhold
2279a8a80e vcs: Fix vcsserver startup with http backend. 2016-10-04 12:53:40 +02:00
Martin Bornhold
dff5dd52e0 http: Allow http, pyro and custom implementations for scm app. 2016-10-04 12:01:10 +02:00
Martin Bornhold
3ec9d222b8 http: Remove default arguments from prepare callback function. 2016-10-04 11:37:36 +02:00
Martin Bornhold
65bc7e55cf vcs: Raise exception if unknown protocol specified for vcs server protocol. 2016-10-04 11:24:56 +02:00
Martin Bornhold
0a1cdb3d33 http: Remove 'pyro4' default values from function arguemnts in vcs init. #4237 2016-10-04 11:24:34 +02:00
Marcin Lulek
73c93af3e7 helpers: flash messages can now carry additional information in json format 2016-10-10 16:00:18 +02:00
Martin Bornhold
ecc24326d7 vcs: Do not pass the backend key into the scm app instances.
We used the key as a value for a response header. Since this header is removed there
is no need to pass the backend key araound.
2016-10-06 16:25:27 +02:00
Martin Bornhold
c6466346b4 vcs: Remove custom response header which contains backend key.
We used this custom header to skip the error handling.
This is no linger needed since the VCS middleware is moved above of the error handling.
2016-10-06 16:10:40 +02:00
Martin Bornhold
1a3f93ca85 error-handling: Remove if condition to check if the response is a vcs response.
We moved the VCS middleware out of the error handling. Therefore we don't need to skip the error handling anymore.
2016-10-06 16:08:34 +02:00
Martin Bornhold
861adffd82 tests: Add a way to deactivate exception re-raising in tests. 2016-10-07 09:15:43 +02:00
Martin Bornhold
b213d2244c wsgi-stack: Refactor the error handling view into a middleware class. 2016-10-06 12:01:57 +02:00
Martin Bornhold
aab8b8038b vcs: Remove dead code. 2016-10-04 14:38:11 +02:00
Marcin Kuzminski
0a39f5bf00 vcs: merge logic with dry run now uses better default arguments.
Helps to find out where the merge came from.
2016-10-03 11:20:25 +02:00
Marcin Kuzminski
721295056f vcs: add missing parameters to base class method. 2016-10-03 11:19:57 +02:00
Martin Bornhold
acc2367ab9 shadow: Simplyfy the regular expression for detecting shadow repository URLs 2016-09-28 13:25:57 +02:00
Martin Bornhold
5eeb75edac shadow: Fix an error in the regex to detect shadow repository URLs. 2016-09-26 14:54:21 +02:00
Martin Bornhold
f0567693de lib: Fix missing space char in bad slug characters string. 2016-09-23 14:16:29 +02:00
Martin Bornhold
9efcbadac8 vcs: Explicit use one of the repo names (acl, url, vcs) 2016-09-23 13:23:32 +02:00
Martin Bornhold
2cd4d08392 vcs: Clean up the shadow-repo-expose code and make some nicer comments. 2016-09-23 12:52:24 +02:00
Martin Bornhold
9ad3d9992f vcs: Move logging from vcs to simplevcs 2016-09-22 16:12:37 +02:00
Martin Bornhold
930ac34f74 vcs: Move shadow repo regex up to class level. 2016-09-22 16:02:35 +02:00
Martin Bornhold
9dca5e1637 shadow: Use only a single regular expression to generate and match repo/group slugs. 2016-09-22 15:33:11 +02:00
Martin Bornhold
86b7b9e996 vcs: Do not trigger external hook in case of actions on shadow respositories. 2016-09-21 13:09:40 +02:00
Martin Bornhold
01b5812099 vcs: Add flag to indicate if repository is a shadow repository. 2016-09-21 13:07:20 +02:00
Martin Bornhold
8d288b7c5f vcs: Use correct repo name attribute and remove workaround. 2016-09-21 09:58:11 +02:00
Martin Bornhold
a385c08a46 pr: Unify clone url generation of shadow repository. 2016-09-21 09:34:47 +02:00
Martin Bornhold
acaaa03219 models: Remove unused imports. 2016-09-20 15:15:12 +02:00
Martin Bornhold
bad396a7d6 vcs: Fix missing import. 2016-09-20 15:14:42 +02:00
Martin Bornhold
31721213be api: Add an entry for pr shadow repositories to api functions. 2016-09-20 15:14:00 +02:00
Martin Bornhold
d65ffadc6c vcs: Get shadow repository file system path by using already existing functions.
We want to have the code that generates the shadow repo file system path at a single place.
2016-09-20 14:28:25 +02:00
Martin Bornhold
b23afad92e vcs: Only allow 'pull' actions on shadow repositories.
We are exposing the shadow repositories of pull requests to allow easy CI integration
or users to access the pull request shadow repo for investigating on it. But we don't
want someone/something to push changes to a shadow repository.
2016-09-19 15:33:46 +02:00
Martin Bornhold
d21d0a537f vcs: Use key lookup to explode if key is not available.
The key has to be in the dictionary, otherwise something changed in the code
and expoding here is better than hiding the error.
2016-09-19 15:31:57 +02:00
Martin Bornhold
a5e4564b0b vcs: Move code for parsing the repository names (url, vcs, acl) from vcs to simplevcs. 2016-09-19 15:21:44 +02:00
Martin Bornhold
3dbe3e4b2e vcs: Use regular expression to recognize requests to shadow repositories. 2016-09-19 14:24:36 +02:00
Johannes Bornhold
08a2b45999 vcs: Minimal change to expose the shadow repository
Based on my original research, this was the "minimal" starting point. It shows
that three concepts are needed for the "repo_name":

* From the security standpoint we think of the shadow repository having the same
  ACL as the target repository of the pull request. This is because the pull
  request itself is considered to be a part of the target repository.

  Out of this thought, the variable "acl_repo_name" is used whenever we want to
  check permissions or when we need the database configuration of the
  repository. An alternative name would have been "db_repo_name", but the usage
  for ACL checking is the most important one.

* From the web interaction perspective, we need the URL which was originally
  used to get to the repository. This is because based on this base URL commands
  can be identified. Especially for Git this is important, so that the commands
  are correctly recognized.

  Since the URL is in the focus, this is called "url_repo_name".

* Finally we have to deal with the repository on the file system. This is what
  the VCS layer deal with normally, so this name is called "vcs_repo_name".


The original repository interaction is a special case where all three names are
the same.

When interacting with a pull request, these three names are typically all
different.

This change is minimal in a sense that it just makes the interaction with a
shadow repository barely work, without checking any special constraints yet.
This was the starting point for further work on this topic.
2016-09-18 20:01:19 +02:00
lisaq
db3f788080 ux: better tooltip for inline comment toggle 2016-09-29 12:32:25 +02:00
Daniel Dourvaris
b3e97c1715 reviewers: store reviewer reasons to database, fixes #4238 2016-09-27 02:34:15 +03:00
Daniel Dourvaris
5290e2381e reviewers: add pull request reviewers reason column to table
to allow showing the reason a user is a reviewer on a pull request
2016-09-23 12:34:53 +02:00
Martin Bornhold
04f3b7803b vcs: Use commit date as modification time when creating archives. #4247 2016-09-27 16:33:55 +02:00