Package com.atlassian.labs.speakeasy.external

Examples of com.atlassian.labs.speakeasy.external.UnauthorizedAccessException


    public int proxy(final HttpServletRequest req, final HttpServletResponse resp, final Request.MethodType methodType) throws UnauthorizedAccessException, IOException
    {
        String user = userManager.getRemoteUsername(req);
        if (!speakeasyService.canAccessSpeakeasy(user))
        {
            throw new UnauthorizedAccessException(user, "Must be able to access Speakeasy to proxy requests");
        }
        if (!permissionManager.allowsPermission(Permission.APPLINKS_PROXY))
        {
            throw new UnauthorizedAccessException(user, "Permission to use Application Links proxy not enabled on this instance");
        }

        try
        {
            return doProxy(req, resp, methodType);
View Full Code Here


    public void render(HttpServletRequest req, HttpServletResponse resp, Writer output, boolean useUserProfileDecorator) throws IOException, UnauthorizedAccessException
    {
        String user = userManager.getRemoteUsername(req);
        if (user == null)
        {
            throw new UnauthorizedAccessException(null, "Unauthorized - must be logged in and have access to Speakeasy");
        }

        webResourceManager.requireResource("com.atlassian.auiplugin:ajs");
        webResourceManager.requireResourcesForContext("speakeasy.user-profile");
        boolean devMode = speakeasyService.canAuthorExtensions(user);
View Full Code Here

    private void validateAccess(String userName) throws UnauthorizedAccessException
    {
        if (!permissionManager.canAccessSpeakeasy(userName))
        {
            log.warn("Unauthorized Speakeasy access by '" + userName + "'");
            throw new UnauthorizedAccessException(userName, "Cannot access Speakeasy due to lack of permissions");
        }
    }
View Full Code Here

    private void validateAuthor(String userName) throws UnauthorizedAccessException
    {
        if (!permissionManager.canAuthorExtensions(userName))
        {
            log.warn("Unauthorized Speakeasy author access by '" + userName + "'");
            throw new UnauthorizedAccessException(userName, "Cannot access Speakeasy due to lack of permissions");
        }
    }
View Full Code Here

    private void validateAccessType(Extension ext, String type, boolean allowed, String user) throws UnauthorizedAccessException
    {
        if (!allowed)
        {
            log.warn("Unauthorized Speakeasy " + type + " access by '" + user + "' for extension '" + ext.getKey() + "'");
            throw new UnauthorizedAccessException(user, "Cannot " + type + " Speakeasy extension '" + ext.getName() + "' due to lack of permissions");
        }
    }
View Full Code Here

    private void validateAdmin(String userName) throws UnauthorizedAccessException
    {
        if (!userManager.isAdmin(userName))
        {
            log.warn("Unauthorized Speakeasy admin access by '" + userName + "'");
            throw new UnauthorizedAccessException(userName, "Cannot access Speakeasy due to lack of permissions");
        }
    }
View Full Code Here

TOP

Related Classes of com.atlassian.labs.speakeasy.external.UnauthorizedAccessException

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.