Skip to content

Commit 541badd

Browse files
authored
Merge pull request ckan#9263 from ckan/9232-default-change-warning
include_users new False default warning text
2 parents 3dea215 + 78e5bf6 commit 541badd

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

changes/9232.misc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
After CKAN 2.12 the include_users parameter to organization_show and group_show
2+
actions will default to False regardless of the ckan.auth.public_user_details
3+
configuration setting.

ckan/logic/action/get.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,8 @@ def group_show(context: Context, data_dict: DataDict) -> ActionResult.GroupShow:
12211221
:param include_users: include the group's users
12221222
(optional, default: ``True`` if ``ckan.auth.public_user_details``
12231223
is ``True`` otherwise ``False``)
1224+
NOTE: after CKAN 2.12 this parameter will default to ``False``
1225+
regardless of the ``ckan.auth.public_user_details`` setting
12241226
:type include_users: bool
12251227
:param include_groups: include the group's sub groups
12261228
(optional, default: ``True``)
@@ -1254,6 +1256,8 @@ def organization_show(context: Context, data_dict: DataDict) -> ActionResult.Org
12541256
:param include_users: include the organization's users
12551257
(optional, default: ``True`` if ``ckan.auth.public_user_details``
12561258
is ``True`` otherwise ``False``)
1259+
NOTE: after CKAN 2.12 this parameter will default to ``False``
1260+
regardless of the ``ckan.auth.public_user_details`` setting
12571261
:type include_users: bool
12581262
:param include_groups: include the organization's sub groups
12591263
(optional, default: ``True``)

ckan/tests/logic/action/test_get.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,7 +2059,7 @@ def test_autocomplete_limit(self):
20592059
result = helpers.call_action("user_autocomplete", q="compl", limit=1)
20602060
assert len(result) == 1
20612061

2062-
def test_autcomplete_email(self):
2062+
def test_autocomplete_email(self):
20632063
user = factories.Sysadmin()
20642064
context = {"user": user["name"]}
20652065
factories.User(name="user1234", email="joe@doe.com")
@@ -2069,7 +2069,7 @@ def test_autcomplete_email(self):
20692069
assert result[0]["name"] == "user1234"
20702070

20712071
# test when user is not sysadmin
2072-
result = helpers.call_action("user_autocomplete", q="joe")
2072+
result = helpers.call_action("user_autocomplete", q="joe@doe.com")
20732073
assert len(result) == 0
20742074

20752075

0 commit comments

Comments
 (0)