コード例 #1
0
        public bool MustRenderSuggestionActionsFor(SOStringSuggestion suggestion)
        {
            if (!UserIsLoggedIn || !UserCanReview)
            {
                return(false);
            }

            // a trusted user can't act on a suggestion approved by a trusted user
            return(!(suggestion.State == StringSuggestionState.ApprovedByTrustedUser && UserType == UserType.TrustedUser));
        }
コード例 #2
0
 public bool CurrentUserSuggested(SOStringSuggestion suggestion) =>
 UserIsLoggedIn && suggestion.CreatedById == UserId;