public Contracts.SmallGroup GetSmallGroup(int groupID) { Contracts.SmallGroupMapper mapper = new Contracts.SmallGroupMapper(); Group group = new Group(groupID); if (group.GroupID == -1) throw new Arena.Services.Exceptions.ResourceNotFoundException("Invalid group ID"); if (RestApi.GroupClusterOperationAllowed(ArenaContext.Current.Person.PersonID, group.GroupClusterID, OperationType.View) == false) throw new Exception("Access denied."); return mapper.FromArena(group); }
public Contracts.SmallGroup GetSmallGroup(int groupID) { Contracts.SmallGroupMapper mapper = new Contracts.SmallGroupMapper(); Group group = new Group(groupID); if (group.GroupID == -1) { throw new Arena.Services.Exceptions.ResourceNotFoundException("Invalid group ID"); } if (RestApi.GroupClusterOperationAllowed(ArenaContext.Current.Person.PersonID, group.GroupClusterID, OperationType.View) == false) { throw new Exception("Access denied."); } return(mapper.FromArena(group)); }