Skip to content

Commit d8b960b

Browse files
committed
Merge branch 'm-kovalsky/940'
2 parents 584b445 + 7880c71 commit d8b960b

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

src/sempy_labs/admin/_items.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,9 @@ def list_items(
188188

189189
@log
190190
def list_item_access_details(
191-
item: str | UUID = None,
192-
type: str = None,
191+
item: str | UUID,
192+
type: str,
193193
workspace: Optional[str | UUID] = None,
194-
**kwargs,
195194
) -> pd.DataFrame:
196195
"""
197196
Returns a list of users (including groups and service principals) and lists their workspace roles.
@@ -204,7 +203,7 @@ def list_item_access_details(
204203
----------
205204
item : str
206205
Name or id of the Fabric item.
207-
type : str, default=None
206+
type : str
208207
Type of Fabric item.
209208
workspace : str | uuid.UUID, default=None
210209
The Fabric workspace name or id.
@@ -216,17 +215,6 @@ def list_item_access_details(
216215
pandas.DataFrame
217216
A pandas dataframe showing a list of users (including groups and service principals) and lists their workspace roles.
218217
"""
219-
if "item_name" in kwargs:
220-
print(
221-
"The 'item_name' parameter has been deprecated. Please replace this parameter with 'item' from the function going forward."
222-
)
223-
item = kwargs["item_name"]
224-
del kwargs["item_name"]
225-
226-
if item is None or type is None:
227-
raise ValueError(
228-
f"{icons.red_dot} The parameter 'item' and 'type' are mandatory."
229-
)
230218

231219
(workspace_name, workspace_id) = _resolve_workspace_name_and_id(workspace)
232220
(item_name, item_id) = _resolve_item_name_and_id(
@@ -247,7 +235,7 @@ def list_item_access_details(
247235
df = _create_dataframe(columns=columns)
248236

249237
response = _base_api(
250-
request=f"/v1/admin/workspaces/{workspace_id}/items/{item_id}/users",
238+
request=f"/v1/admin/workspaces/{workspace_id}/items/{item_id}/users?type={type}",
251239
client="fabric_sp",
252240
)
253241

0 commit comments

Comments
 (0)