Skip to content

Commit b092c54

Browse files
authored
false positives in group check (#1)
* false positives in group check * build * plone * plone
1 parent 6b07f2e commit b092c54

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

constraints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-c https://dist.plone.org/release/6.0.14/constraints.txt
1+
-c https://dist.plone.org/release/6.1-dev/constraints.txt

news/2.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- False positives in local_groups check [mamico]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://github.com/plone/meta/tree/main/config/default
33
# See the inline comments on how to expand/tweak this configuration file
44
[build-system]
5-
requires = ["setuptools>=68.2"]
5+
requires = ["setuptools>=75.1"]
66

77
[tool.towncrier]
88
directory = "news/"

src/redturtle/pasldap/resilient.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
]
2222
RESERVED_LOGINS = RESERVED_IDS
2323

24+
2425
# [node.ext.ldap:511][MainThread] LDAP search with filter: (&(objectClass=person)(sAMAccountName=root))
2526

2627
# [redturtle.pasldap:58][MainThread] func=pas.plugins.ldap.plugin.enumerateUsers info=None args=(<LDAPPlugin at /.../acl_users/pasldap>,) kwargs={'id': None, 'login': None, 'exact_match': False, 'sort_by': None, 'max_results': None, 'fullname': 'mario'} elapsed=32ms threshold=-1ms 🤔
@@ -87,12 +88,8 @@ def _wrapper(
8788
logger.info("MISS: enumerateUsers %s", cache_key)
8889
if not users:
8990
local_users = api.portal.get_tool("acl_users").source_users
90-
local_groups = api.portal.get_tool("acl_users").source_groups
91-
if not local_users.enumerateUsers(
92-
id=id, login=login, exact_match=True
93-
) and not local_groups.enumerateGroups(
94-
id=id, login=login, exact_match=True
95-
):
91+
# local_groups = api.portal.get_tool("acl_users").source_groups
92+
if not local_users.enumerateUsers(id=id, login=login, exact_match=True):
9693
# TODO: verificare se il risultato vuoto è un errore (da non mettere in cache) o veramente
9794
# un risultato vuoto (da mettere in cache? solo temporaneamente?)
9895
logger.warning(

tox.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ set_env =
105105
deps =
106106
pytest-plone
107107
pytest
108-
-c https://dist.plone.org/release/6.0-dev/constraints.txt
108+
-c https://dist.plone.org/release/6.1-dev/constraints.txt
109109

110110
##
111111
# Specify additional deps in .meta.toml:
@@ -147,7 +147,7 @@ deps =
147147
pytest-plone
148148
pytest
149149
coverage
150-
-c https://dist.plone.org/release/6.0.14/constraints.txt
150+
-c https://dist.plone.org/release/6.1-dev/constraints.txt
151151

152152
commands =
153153
coverage run --source redturtle.pasldap -m pytest {posargs} --disable-warnings {toxinidir}/tests
@@ -164,7 +164,7 @@ deps =
164164
twine
165165
build
166166
towncrier
167-
-c https://dist.plone.org/release/6.0.14/constraints.txt
167+
-c https://dist.plone.org/release/6.1-dev/constraints.txt
168168

169169
commands =
170170
# fake version to not have to install the package
@@ -192,7 +192,7 @@ allowlist_externals =
192192
deps =
193193
pipdeptree
194194
pipforester
195-
-c https://dist.plone.org/release/6.0.14/constraints.txt
195+
-c https://dist.plone.org/release/6.1-dev/constraints.txt
196196

197197
commands =
198198
# Generate the full dependency tree

0 commit comments

Comments
 (0)