Examples of canClone()


Examples of com.gitblit.models.UserModel.canClone()

    // add the owner of the source repository to the clone's access list
    if (!ArrayUtils.isEmpty(repository.owners)) {
      for (String owner : repository.owners) {
        UserModel originOwner = userManager.getUserModel(owner);
        if (originOwner != null && !originOwner.canClone(cloneModel)) {
          // origin owner can't yet clone fork, grant explicit clone access
          originOwner.setRepositoryPermission(cloneName, AccessPermission.CLONE);
          reviseUser(originOwner.username, originOwner);
        }
      }
View Full Code Here

Examples of com.gitblit.transport.ssh.SshKey.canClone()

public class Upload extends BaseGitCommand {
  @Override
  protected void runImpl() throws Failure {
    try {
      SshKey key = getContext().getClient().getKey();
      if (key != null && !key.canClone()) {
        throw new Failure(1, "Sorry, your SSH public key is not allowed to clone!");
      }
      UploadPack up = uploadPackFactory.create(getContext().getClient(), repo);
      up.upload(in, out, null);
    } catch (Exception e) {
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.