public static void RequestAnyAccess(this CommentDiscussion discussion, int currentUserId) { if (!(discussion.HasMasterAccess(currentUserId) || discussion.HasPlayerAccess(currentUserId))) { throw new NoAccessToProjectException(discussion, currentUserId); } }
public static bool HasAnyAccess(this CommentDiscussion discussion, int currentUserId) { return(discussion.HasMasterAccess(currentUserId) || discussion.HasPlayerAccess(currentUserId)); }