Skip to content

Commit e0e373f

Browse files
authored
Add GetGroupData method to Permissions library (#90)
1 parent 44cd512 commit e0e373f

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/Libraries/Permission.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,22 @@ public bool GroupExists(string groupName)
762762
return !string.IsNullOrEmpty(groupName) && (groupName.Equals("*") || groupsData.ContainsKey(groupName));
763763
}
764764

765+
/// <summary>
766+
/// Returns the data for the specified group
767+
/// </summary>
768+
/// <param name="groupName"></param>
769+
/// <returns></returns>
770+
public GroupData GetGroupData(string groupName)
771+
{
772+
if (!groupsData.TryGetValue(groupName, out GroupData groupData))
773+
{
774+
return null;
775+
}
776+
777+
// Return the data
778+
return groupData;
779+
}
780+
765781
/// <summary>
766782
/// Returns existing groups
767783
/// </summary>

0 commit comments

Comments
 (0)