Esempio n. 1
0
        public bool IsGroupOwner(int groupId, int userId)
        {
            var ownerRoleId = _roleRepository.Get(r => r.Name.Equals(RoleNames.ROLE_OWNER)).Select(r => r.Id).Single();

            var groupExists = _groupMemberRepository.Has(g => (g.GroupId == groupId && g.RoleId == ownerRoleId && g.UserId == userId));

            return(groupExists);
        }