merged default into stable

This commit is contained in:
RhodeCode Admin 2022-10-12 16:05:14 +02:00
commit 6875b20c09
6 changed files with 84 additions and 4 deletions

View file

@ -24,7 +24,7 @@ done = true
[release]
state = prepared
version = 4.27.0
version = 4.26.0
[task:generate_js_routes]

View file

@ -262,3 +262,39 @@ ishell interface should be used.
In [1]: repo = Repository.get_by_repo_name('SOME_REPO_NAME')
In [2]: repo.archived = False
In [3]: Session().add(repo);Session().commit()
Bulk change repository owner
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here's how one can change an owner of repository for an user who has been de activated.
Settings a new owner can be done via ishell for all repositories that past owner had.
do run this script the interactive ishell interface should be used.
.. code-block:: bash
# Open iShell from the terminal
$ rccontrol ishell enterprise-1/community-1
.. code-block:: python
from rhodecode.model.db import User, Repository, Session
from rhodecode.model.permission import PermissionModel
# replace old-owner and new-owner with your exact users
old_owner = User.get_by_username('old-owner')
new_owner = User.get_by_username('new-owner')
# list of users we need to "flush" permissions
affected_user_ids = [new_owner.user_id, old_owner.user_id]
for repo in Repository.get_all_repos(user_id=old_owner.user_id):
repo.user = new_owner
Session().add(repo)
Session().commit()
PermissionModel().trigger_permission_flush(affected_user_ids)

View file

@ -0,0 +1,40 @@
|RCE| 4.27.1 |RNS|
------------------
Release Date
^^^^^^^^^^^^
- 2022-10-12
New Features
^^^^^^^^^^^^
General
^^^^^^^
Security
^^^^^^^^
Performance
^^^^^^^^^^^
Fixes
^^^^^
- VCSServer: fixes the file-store backend to use serialized names for filename cache of vcsserver.
Upgrade notes
^^^^^^^^^^^^^
- Un-scheduled release 4.27.1 addressing some new cache backed problems.

View file

@ -9,6 +9,7 @@ Release Notes
.. toctree::
:maxdepth: 1
release-notes-4.27.1.rst
release-notes-4.27.0.rst
release-notes-4.26.0.rst
release-notes-4.25.2.rst

View file

@ -1883,7 +1883,7 @@ self: super: {
};
};
"rhodecode-enterprise-ce" = super.buildPythonPackage {
name = "rhodecode-enterprise-ce-4.27.0";
name = "rhodecode-enterprise-ce-4.27.1";
buildInputs = [
self."pytest"
self."py"

View file

@ -185,8 +185,10 @@ class RemoteRepo(object):
self.url = remote_maker.url
self.stream_url = remote_maker.stream_url
self._session = remote_maker._session_factory()
cache_repo_id = self._repo_id_sanitizer(repo_id)
self._cache_region, self._cache_namespace = \
remote_maker.init_cache_region(self._repo_id_sanitizer(repo_id))
remote_maker.init_cache_region(cache_repo_id)
with_wire = with_wire or {}
@ -194,6 +196,7 @@ class RemoteRepo(object):
self._wire = {
"path": path, # repo path
"repo_id": repo_id,
"cache_repo_id": cache_repo_id,
"config": config,
"repo_state_uid": repo_state_uid,
"context": self._create_vcs_cache_context(path, repo_state_uid)
@ -210,7 +213,7 @@ class RemoteRepo(object):
self.cert_dir = get_cert_path(rhodecode.CONFIG.get('__file__'))
def _repo_id_sanitizer(self, repo_id):
return repo_id.replace('/', '__')
return repo_id.replace('/', '__').replace('-', '_')
def __getattr__(self, name):