Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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));
        }