com.pmease.quickbuild.security
Class SecurityHelper

java.lang.Object
  extended by com.pmease.quickbuild.security.SecurityHelper

public class SecurityHelper
extends java.lang.Object


Constructor Summary
SecurityHelper()
           
 
Method Summary
static User authenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static User authenticate(java.lang.String userName, java.lang.String password, java.lang.String ip)
           
static void checkAgentToken(javax.servlet.http.HttpServletRequest request)
           
static void clearAuthenticationCookies(javax.servlet.http.HttpServletResponse response)
           
static void createAuthenticationCookies(javax.servlet.http.HttpServletResponse response, java.lang.String userName, java.lang.String password)
           
static boolean hasPermission()
           
static boolean hasPermission(Configuration configuration)
           
static boolean hasPermission(Configuration configuration, java.lang.String permission)
           
static boolean hasPermission(java.lang.String permission)
           
static boolean hasPermission(User user, Configuration configuration)
           
static boolean hasPermission(User user, Configuration configuration, java.lang.String permission)
          Determines whether or not specified user has specified permission over specified configuration
static boolean isAdmin()
           
static boolean isAdmin(User user)
          Determines whether or not specified user is an administrator
static boolean isAgentAllowed()
           
static boolean isAgentAllowed(User user)
           
static boolean isAnonymousEnabled()
           
static boolean isEditSettingAllowed()
           
static boolean isEditSettingAllowed(Configuration configuration)
           
static boolean isExpandAllAllowed()
           
static boolean isExpandAllAllowed(User user)
           
static boolean isNodeAttributesAllowed(User user)
           
static boolean isScriptAllowed(User user)
           
static boolean isSelfRegisterEnabled()
           
static boolean isShareDashboardAllowed()
           
static boolean isShareDashboardAllowed(User user)
           
static boolean isSystemLogAllowed()
           
static boolean isSystemLogAllowed(User user)
           
static boolean isViewAlertsAllowed()
           
static boolean isViewAlertsAllowed(User user)
           
static void respondWithAccessDenied(javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityHelper

public SecurityHelper()
Method Detail

isAdmin

public static boolean isAdmin(User user)
Determines whether or not specified user is an administrator

Parameters:
user - null in case of anonymous user

isAdmin

public static boolean isAdmin()

isAgentAllowed

public static boolean isAgentAllowed()

isEditSettingAllowed

public static boolean isEditSettingAllowed(Configuration configuration)

isEditSettingAllowed

public static boolean isEditSettingAllowed()

isAgentAllowed

public static boolean isAgentAllowed(User user)

isScriptAllowed

public static boolean isScriptAllowed(User user)

isShareDashboardAllowed

public static boolean isShareDashboardAllowed(User user)

isShareDashboardAllowed

public static boolean isShareDashboardAllowed()

isViewAlertsAllowed

public static boolean isViewAlertsAllowed(User user)

isViewAlertsAllowed

public static boolean isViewAlertsAllowed()

isSystemLogAllowed

public static boolean isSystemLogAllowed()

isExpandAllAllowed

public static boolean isExpandAllAllowed()

isSystemLogAllowed

public static boolean isSystemLogAllowed(User user)

isNodeAttributesAllowed

public static boolean isNodeAttributesAllowed(User user)

isExpandAllAllowed

public static boolean isExpandAllAllowed(User user)

hasPermission

public static boolean hasPermission(User user,
                                    Configuration configuration)

hasPermission

public static boolean hasPermission(Configuration configuration)

hasPermission

public static boolean hasPermission(User user,
                                    Configuration configuration,
                                    java.lang.String permission)
Determines whether or not specified user has specified permission over specified configuration

Parameters:
user - null in case of anonymous user
configuration -
permission - null stands for any permission

hasPermission

public static boolean hasPermission(Configuration configuration,
                                    java.lang.String permission)

hasPermission

public static boolean hasPermission(java.lang.String permission)

hasPermission

public static boolean hasPermission()

isAnonymousEnabled

public static boolean isAnonymousEnabled()

isSelfRegisterEnabled

public static boolean isSelfRegisterEnabled()

authenticate

public static User authenticate(java.lang.String userName,
                                java.lang.String password,
                                java.lang.String ip)

authenticate

public static User authenticate(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response)

checkAgentToken

public static void checkAgentToken(javax.servlet.http.HttpServletRequest request)

respondWithAccessDenied

public static void respondWithAccessDenied(javax.servlet.http.HttpServletResponse response)

createAuthenticationCookies

public static void createAuthenticationCookies(javax.servlet.http.HttpServletResponse response,
                                               java.lang.String userName,
                                               java.lang.String password)

clearAuthenticationCookies

public static void clearAuthenticationCookies(javax.servlet.http.HttpServletResponse response)


Copyright © 2005-2010 PMEase Inc. All Rights Reserved.