Package com.google.gerrit.server.project

Examples of com.google.gerrit.server.project.ChangeControl.forUser()


          if (member.isActive()) {
            final IdentifiedUser user =
                identifiedUserFactory.create(member.getId());
            // Does not account for draft status as a user might want to let a
            // reviewer see a draft.
            if (control.forUser(user).isRefVisible()) {
              reviewerIds.add(member.getId());
            }
          }
        }
        continue;
View Full Code Here


      }

      final IdentifiedUser user = identifiedUserFactory.create(account.getId());
      // Does not account for draft status as a user might want to let a
      // reviewer see a draft.
      if (!control.forUser(user).isRefVisible()) {
        result.addError(new ReviewerResult.Error(
            ReviewerResult.Error.Type.CHANGE_NOT_VISIBLE,
            formatUser(account, reviewer)));
        continue;
      }
View Full Code Here

          public boolean isVisible(Account account) throws OrmException {
            IdentifiedUser who =
                identifiedUserFactory.create(reviewDbProvider, account.getId());
            // we can't use changeControl directly as it won't suggest reviewers
            // to drafts
            return changeControl.forUser(who).isRefVisible();
          }
        };

        final List<AccountInfo> suggestedAccounts =
            suggestAccount(db, query, Boolean.TRUE, limit, visibilityControl);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.