Commit message Age Author Refs
r8716:ed117efc
middleware: fix url_scheme_variable 070b8c39736f accidentally introduced a wrong assumption that url_scheme_variable is a bool. Fix to only check whether it has been set to something non-empty.
Mads Kiilerich
0
r8715:2065fe5b
middleware: use config consistently in https_fixup 070b8c39736f did for unknown reasons introduce a use of the global kallithea.CONFIG . Instead, consistently use the application config object that has been passed.
Mads Kiilerich
0
r8714:0f9415c2
html: align formatting of edit_perms templates
Mads Kiilerich
0
r8713:5572eb8d
html: clarify type of button elements - make it clear if we really want "submit" This might fix some real problems.
Mads Kiilerich
0
r8712:cc70797e
usergroup: fix adding permission Clicking "Add new" on /_admin/user_groups/1/edit/perms would flicker the input fields, and then show "User group permissions updated". That turns out to be because HTML button tags default to 'submit' inside forms, and in this place (but not for user or repo group permissions) we didn't specify the button type as 'button'. There might be other similar problems.
Mads Kiilerich
0
r8711:ee1da602
repo_groups: fix deletion of subgroups Deletion of a repository group that has a parent group (i.e. is not at the root of the repository group tree) failed as follows: Traceback (most recent call last): [...] File ".../lib/python3.9/site-packages/tg/configurator/components/dispatch.py", line 114, in _call_controller return controller(*remainder, **params) File "<decorator-gen-5>", line 2, in delete File "/home/tdescham/repo/contrib/kallithea/kallithea-release/kallithea/lib/auth.py", line 572, in __wrapper return func(*fargs, **fkwargs) File "/home/tdescham/repo/contrib/kallithea/kallithea-release/kallithea/controllers/admin/repo_groups.py", line 271, in delete if gr.parent_group: File ".../lib/python3.9/site-packages/sqlalchemy/orm/attributes.py", line 294, in __get__ return self.impl.get(instance_state(instance), dict_) File ".../lib/python3.9/site-packages/sqlalchemy/orm/attributes.py", line 730, in get value = self.callable_(state, passive) File ".../lib/python3.9/site-packages/sqlalchemy/orm/strategies.py", line 717, in _load_for_state raise orm_exc.DetachedInstanceError( sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <RepoGroup at 0x7f1f2664f4c0> is not bound to a Session; lazy load operation of attribute 'parent_group' cannot proceed (Background on this error at: http://sqlalche.me/e/13/bhk3) In the reference 'gr.parent_group', 'gr' is an SQLAlchemy object referring to the group being deleted, and 'gr.parent_group' is a lazy reference to its parent group. The 'lazy' means that the parent group object is not loaded automatically when 'gr' is assigned, but instead will be loaded on-the-fly when the parent group is actually accessed. See [1] and [2] for more information. The problem was that the lazy 'parent_group' attribute was accessed _after_ deleting the database object it was part of. Fix this by obtaining a handle to the parent group _before_ deleting the subgroup. Reported-by: André Klitzing (via mailing list) [1] https://docs.sqlalchemy.org/en/13/errors.html#error-bhk3 [2] https://docs.sqlalchemy.org/en/13/orm/loading_relationships.html
Thomas De Schampheleire
0
r8710:2ef4f7c0
tests: merge test_repo_groups.py into test_admin_repo_groups.py Two files testing the same underlying code. As this code is really in the 'admin' section, merge into test_admin_repo_groups.py.
Thomas De Schampheleire
0
r8709:7da398c0
tests: cleanup selective 'base' imports of test_admin_repo_groups.py It is considered cleaner to have more top-level imports rather than selecting specific names.
Thomas De Schampheleire
0
r8708:d625696a
meta: update copyrights
Mads Kiilerich
0
r8707:586ce8c2
vcs: use correct name of parameter “reverse” in docstring of get_changesets()
Manuel Jacob
0
< 1 .. 7 8 9 10 11 .. 880 >