Examples of forUser()


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

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

      }

      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

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

          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

Examples of org.openstreetmap.josm.io.ChangesetQuery.forUser()

            if (im.isAnonymous())
                // we still don't know anything about the current user. Can't retrieve
                // its changesets
                return;
            else if (im.isFullyIdentified()) {
                query = query.forUser(im.getUserId());
            } else {
                // we only know the users name, not its id. Nevermind, try to read
                // its open changesets anyway.
                //
                query = query.forUser(im.getUserName());
View Full Code Here

Examples of org.openstreetmap.josm.io.ChangesetQuery.forUser()

                query = query.forUser(im.getUserId());
            } else {
                // we only know the users name, not its id. Nevermind, try to read
                // its open changesets anyway.
                //
                query = query.forUser(im.getUserName());
            }
            changesets = reader.queryChangesets(
                    query,
                    getProgressMonitor().createSubTaskMonitor(1, false /* not internal */)
            );
View Full Code Here

Examples of org.openstreetmap.josm.io.ChangesetQuery.forUser()

                alertAnonymousUser();
                return;
            }
            ChangesetQuery query = new ChangesetQuery();
            if (im.isFullyIdentified()) {
                query = query.forUser(im.getUserId());
            } else {
                query = query.forUser(im.getUserName());
            }
            ChangesetQueryTask task = new ChangesetQueryTask(ChangesetCacheManager.this, query);
            ChangesetCacheManager.getInstance().runDownloadTask(task);
View Full Code Here

Examples of org.openstreetmap.josm.io.ChangesetQuery.forUser()

            }
            ChangesetQuery query = new ChangesetQuery();
            if (im.isFullyIdentified()) {
                query = query.forUser(im.getUserId());
            } else {
                query = query.forUser(im.getUserName());
            }
            ChangesetQueryTask task = new ChangesetQueryTask(ChangesetCacheManager.this, query);
            ChangesetCacheManager.getInstance().runDownloadTask(task);
        }
    }
View Full Code Here

Examples of org.openstreetmap.josm.io.ChangesetQuery.forUser()

            break;
        }

        if (cbMyChangesetsOnly.isSelected()) {
            if (im.isPartiallyIdentified()) {
                query = query.forUser(im.getUserName());
            } else if (im.isFullyIdentified()) {
                query = query.forUser(im.getUserId()).beingOpen(true);
            } else
                // anonymous -- can happen with a fresh config.
                throw new IllegalStateException(tr("Cannot create changeset query for open changesets of anonymous user"));
View Full Code Here

Examples of org.openstreetmap.josm.io.ChangesetQuery.forUser()

        if (cbMyChangesetsOnly.isSelected()) {
            if (im.isPartiallyIdentified()) {
                query = query.forUser(im.getUserName());
            } else if (im.isFullyIdentified()) {
                query = query.forUser(im.getUserId()).beingOpen(true);
            } else
                // anonymous -- can happen with a fresh config.
                throw new IllegalStateException(tr("Cannot create changeset query for open changesets of anonymous user"));
        }
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.