Package org.eclipse.jgit.transport.resolver

Examples of org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException


        UserProfile userProfile = userManager.getUserProfile(user);

        final UserExtension userExtension = speakeasyService.getRemotePlugin(pluginKey, user);
        if (userExtension != null && !userExtension.isCanEdit())
        {
            throw new ServiceNotAuthorizedException();
        }
        ReceiveCommits rc = new ReceiveCommits(userProfile, userExtension, repo, speakeasyService, gitRepositoryManager);
        return rc.getReceivePack();
    }
View Full Code Here


      throw new ServiceNotEnabledException();
    }

    if (user != null && !"".equals(user))
      return createFor(req, db, user);
    throw new ServiceNotAuthorizedException();
  }
View Full Code Here

      transport = Transport.SSH;
    }

    if (!acceptPush(transport)) {
      throw new ServiceNotAuthorizedException();
    }

    boolean allowAnonymousPushes = settings.getBoolean(Keys.git.allowAnonymousPushes, false);
    if (!allowAnonymousPushes && UserModel.ANONYMOUS.equals(user)) {
      // prohibit anonymous pushes
View Full Code Here

      } catch (NoSuchProjectException err) {
        throw new RepositoryNotFoundException(projectName);
      }
      if (!pc.isVisible()) {
        if (pc.getCurrentUser() instanceof AnonymousUser) {
          throw new ServiceNotAuthorizedException();
        } else {
          throw new ServiceNotEnabledException();
        }
      }
      req.setAttribute(ATT_CONTROL, pc);
View Full Code Here

        throws ServiceNotAuthorizedException {
      final ProjectControl pc = (ProjectControl) req.getAttribute(ATT_CONTROL);

      if (!(pc.getCurrentUser() instanceof IdentifiedUser)) {
        // Anonymous users are not permitted to push.
        throw new ServiceNotAuthorizedException();
      }

      final IdentifiedUser user = (IdentifiedUser) pc.getCurrentUser();
      final ReceiveCommits rc = factory.create(pc, db).getReceiveCommits();
      rc.getReceivePack().setRefLogIdent(user.newRefLogIdent());
View Full Code Here

      throw new ServiceNotEnabledException();
    }

    if (user != null && !"".equals(user))
      return createFor(req, db, user);
    throw new ServiceNotAuthorizedException();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException

Copyright © 2018 www.massapicom. 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.