Beispiel #1
0
        public Group CreateGroup(string name, string description, bool isPublic)
        {
            var newgroup = new Group
            {
                Name = name,
                Description = description,
                IsPublic = isPublic
            };

            var user = _securityService.CurrentUser();

            newgroup.Members.Add(user);

            user.Community.Groups.Add(newgroup);

            _unitOfWork.Save();

            return newgroup;
        }
Beispiel #2
0
 public bool UserNeedsInviteTo(Group group)
 {
     return !group.Members.Contains(_securityService.CurrentUser()) && !group.IsPublic;
 }
Beispiel #3
0
 public bool UserIsSubscribedTo(Group group)
 {
     return group.Members.Contains(_securityService.CurrentUser()) ;
 }