release: merge back stable branch into default
This commit is contained in:
commit
f8d09a6e9d
5 changed files with 59 additions and 1 deletions
41
docs/release-notes/release-notes-4.10.4.rst
Normal file
41
docs/release-notes/release-notes-4.10.4.rst
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
|RCE| 4.10.4 |RNS|
|
||||
------------------
|
||||
|
||||
Release Date
|
||||
^^^^^^^^^^^^
|
||||
|
||||
- 2017-11-14
|
||||
|
||||
|
||||
New Features
|
||||
^^^^^^^^^^^^
|
||||
|
||||
|
||||
|
||||
General
|
||||
^^^^^^^
|
||||
|
||||
|
||||
|
||||
Security
|
||||
^^^^^^^^
|
||||
|
||||
|
||||
|
||||
Performance
|
||||
^^^^^^^^^^^
|
||||
|
||||
|
||||
|
||||
Fixes
|
||||
^^^^^
|
||||
|
||||
|
||||
- repository groups: fixed a regressions in update of nested repository groups.
|
||||
|
||||
|
||||
Upgrade notes
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
- Fixes regression in nested repository groups update. No upgrade problems should
|
||||
be expected
|
||||
|
|
@ -9,6 +9,7 @@ Release Notes
|
|||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
release-notes-4.10.4.rst
|
||||
release-notes-4.10.3.rst
|
||||
release-notes-4.10.2.rst
|
||||
release-notes-4.10.1.rst
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ class RepoGroupSettingsView(RepoGroupAppView):
|
|||
|
||||
# use the new full name for redirect once we know we updated
|
||||
# the name on filesystem and in DB
|
||||
new_repo_group_name = schema_data['repo_group_name']
|
||||
new_repo_group_name = schema_data['repo_group']['repo_group_name_with_group']
|
||||
|
||||
h.flash(_('Repository Group `{}` updated successfully').format(
|
||||
old_repo_group_name), category='success')
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ def get_group_and_repo(repo_name):
|
|||
repo_name, get_object=True)
|
||||
|
||||
|
||||
def get_repo_group(repo_group_id):
|
||||
from rhodecode.model.repo_group import RepoGroup
|
||||
return RepoGroup.get(repo_group_id), RepoGroup.CHOICES_SEPARATOR
|
||||
|
||||
|
||||
@colander.deferred
|
||||
def deferred_can_write_to_group_validator(node, kw):
|
||||
old_values = kw.get('old_values') or {}
|
||||
|
|
@ -178,6 +183,7 @@ class GroupType(colander.Mapping):
|
|||
parent_group_name,
|
||||
parent_group) = get_group_and_repo(validated_name)
|
||||
|
||||
appstruct['repo_group_name_with_group'] = validated_name
|
||||
appstruct['repo_group_name_without_group'] = repo_group_name_without_group
|
||||
appstruct['repo_group_name'] = parent_group_name or types.RootLocation
|
||||
if parent_group:
|
||||
|
|
@ -271,6 +277,14 @@ class RepoGroupSettingsSchema(RepoGroupSchema):
|
|||
appstruct = super(RepoGroupSchema, self).deserialize(cstruct)
|
||||
validated_name = appstruct['repo_group_name']
|
||||
|
||||
# because of repoSchema adds repo-group as an ID, we inject it as
|
||||
# full name here because validators require it, it's unwrapped later
|
||||
# so it's safe to use and final name is going to be without group anyway
|
||||
|
||||
group, separator = get_repo_group(appstruct['repo_group'])
|
||||
if group:
|
||||
validated_name = separator.join([group.group_name, validated_name])
|
||||
|
||||
# second pass to validate permissions to repo_group
|
||||
second = RepoGroupAccessSchema().bind(**self.bindings)
|
||||
appstruct_second = second.deserialize({'repo_group': validated_name})
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ class TestRepoGroupSchema(object):
|
|||
assert schema_data['repo_group'] == {
|
||||
'repo_group_id': None,
|
||||
'repo_group_name': types.RootLocation,
|
||||
'repo_group_name_with_group': u'my_schema_group',
|
||||
'repo_group_name_without_group': u'my_schema_group'}
|
||||
|
||||
@pytest.mark.parametrize('given, err_key, expected_exc', [
|
||||
|
|
@ -96,6 +97,7 @@ class TestRepoGroupSchema(object):
|
|||
assert schema_data['repo_group'] == {
|
||||
'repo_group_id': test_repo_group.group_id,
|
||||
'repo_group_name': test_repo_group.group_name,
|
||||
'repo_group_name_with_group': full_name,
|
||||
'repo_group_name_without_group': u'my_schema_group'}
|
||||
|
||||
def test_deserialize_with_group_name_regular_user_no_perms(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue