congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
ServiceNotAuthorizedException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException
constructor

Best Java code snippets using org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException.<init> (Showing top 4 results out of 315)

origin: com.madgag/org.eclipse.jgit.http.server

public ReceivePack create(final HttpServletRequest req, final Repository db)
    throws ServiceNotEnabledException, ServiceNotAuthorizedException {
  final ServiceConfig cfg = db.getConfig().get(CONFIG);
  String user = req.getRemoteUser();
  if (cfg.set) {
    if (cfg.enabled) {
      if (user == null || "".equals(user))
        user = "anonymous";
      return createFor(req, db, user);
    }
    throw new ServiceNotEnabledException();
  }
  if (user != null && !"".equals(user))
    return createFor(req, db, user);
  throw new ServiceNotAuthorizedException();
}
origin: sonia.jgit/org.eclipse.jgit.http.server

public ReceivePack create(final HttpServletRequest req, final Repository db)
    throws ServiceNotEnabledException, ServiceNotAuthorizedException {
  final ServiceConfig cfg = db.getConfig().get(CONFIG);
  String user = req.getRemoteUser();
  if (cfg.set) {
    if (cfg.enabled) {
      if (user == null || "".equals(user))
        user = "anonymous";
      return createFor(req, db, user);
    }
    throw new ServiceNotEnabledException();
  }
  if (user != null && !"".equals(user))
    return createFor(req, db, user);
  throw new ServiceNotAuthorizedException();
}
origin: com.atlassian.labs/speakeasy-plugin

  public ReceivePack create(HttpServletRequest req, Repository repo) throws ServiceNotEnabledException, ServiceNotAuthorizedException
  {
    String user = userManager.getRemoteUsername(req);
    String pluginKey = repo.getWorkTree().getName();
    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();
  }
}
origin: winstonli/writelatex-git-bridge

  throw new ServiceMayNotContinueException(e);
} catch (ForbiddenException e) {
  throw new ServiceNotAuthorizedException();
} catch (GitUserException e) {
  throw new ServiceMayNotContinueException(e.getMessage(), e);
org.eclipse.jgit.transport.resolverServiceNotAuthorizedException<init>

Javadoc

Indicates that the requested service requires authentication.

Popular methods of ServiceNotAuthorizedException

  • getMessage

Popular in Java

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • findViewById (Activity)
  • getResourceAsStream (ClassLoader)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • JPanel (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now