Skip to content

Commit 38728b3

Browse files
committed
Issue 53243: Add "includeEmptyPermGroups" to GetGroupPermsCommand
1 parent 94d9db8 commit 38728b3

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/org/labkey/remoteapi/security/GetGroupPermsCommand.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,32 @@
2222

2323
public class GetGroupPermsCommand extends GetCommand<GetGroupPermsResponse>
2424
{
25+
private boolean _includeEmptyPermGroups = true;
2526
private boolean _includeSubfolders = false;
2627

2728
public GetGroupPermsCommand()
2829
{
2930
super("security", "getGroupPerms");
3031
}
3132

33+
/**
34+
* Determines whether groups with no effective permissions are included in the result.
35+
* @return true or false (default is true).
36+
*/
37+
public boolean isIncludeEmptyPermGroups()
38+
{
39+
return _includeEmptyPermGroups;
40+
}
41+
42+
/**
43+
* Sets whether groups with no effective permissions are included in the result.
44+
* @param includeEmptyPermGroups true to include groups with no effective permissions
45+
*/
46+
public void setIncludeEmptyPermGroups(boolean includeEmptyPermGroups)
47+
{
48+
_includeEmptyPermGroups = includeEmptyPermGroups;
49+
}
50+
3251
/**
3352
* Returns whether the command will recurse down the subfolders
3453
* of the folder in which the command is executed.
@@ -60,6 +79,7 @@ protected Map<String, Object> createParameterMap()
6079
{
6180
Map<String, Object> params = super.createParameterMap();
6281
params.put("includeSubfolders", isIncludeSubfolders());
82+
params.put("includeEmptyPermGroups", isIncludeEmptyPermGroups());
6383

6484
return params;
6585
}

0 commit comments

Comments
 (0)