コード例 #1
0
 public static void RequestAnyAccess(this CommentDiscussion discussion, int currentUserId)
 {
     if (!(discussion.HasMasterAccess(currentUserId) || discussion.HasPlayerAccess(currentUserId)))
     {
         throw new NoAccessToProjectException(discussion, currentUserId);
     }
 }
コード例 #2
0
 public static bool HasAnyAccess(this CommentDiscussion discussion, int currentUserId)
 {
     return(discussion.HasMasterAccess(currentUserId) || discussion.HasPlayerAccess(currentUserId));
 }