diff --git a/lib/galaxy/util/path/__init__.py b/lib/galaxy/util/path/__init__.py index 92e8d228980..1ed4896e88c 100644 --- a/lib/galaxy/util/path/__init__.py +++ b/lib/galaxy/util/path/__init__.py @@ -244,7 +244,7 @@ def __path_permission_for_user(path: GenericPath, username: str) -> bool: other_permissions = int(oct_mode[-1]) if ( other_permissions >= 4 - or (file_owner == username and owner_permissions >= 4) + or (file_owner.pw_name == username and owner_permissions >= 4) or (username in group_members and group_permissions >= 4) ): return True diff --git a/mypy.ini b/mypy.ini index e04dffe2c5a..5797bdaa82c 100644 --- a/mypy.ini +++ b/mypy.ini @@ -6,6 +6,7 @@ exclude = lib/galaxy/tools/bundled|test/functional pretty = True no_implicit_reexport = True no_implicit_optional = True +strict_equality = True # green list - work on growing these please! [mypy-galaxy.util.compression_utils]