Class AdminEnforcer
- java.lang.Object
-
- com.atlassian.confluence.impl.webapp.security.enforcer.AdminEnforcer
-
- All Implemented Interfaces:
SecurityEnforcer
public final class AdminEnforcer extends Object implements SecurityEnforcer
Enforces admin privileges for actions that are annotated byAdminOnly
orSystemAdminOnly
.- Since:
- 8.8
-
-
Field Summary
-
Fields inherited from interface com.atlassian.confluence.impl.webapp.security.SecurityEnforcer
LOGIN_PATH, NOT_PERMITTED_PATH
-
-
Constructor Summary
Constructors Constructor Description AdminEnforcer(PermissionManager permissionManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enforce(ConfluenceUser user, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Enforcement action that should be taken whenSecurityEnforcer.shouldEnforce(com.atlassian.confluence.user.ConfluenceUser, com.atlassian.confluence.impl.webapp.security.MappedAction, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
returnstrue
.boolean
shouldEnforce(ConfluenceUser user, MappedAction mappedAction, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
-
-
Constructor Detail
-
AdminEnforcer
public AdminEnforcer(PermissionManager permissionManager)
-
-
Method Detail
-
shouldEnforce
public boolean shouldEnforce(ConfluenceUser user, MappedAction mappedAction, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
- Specified by:
shouldEnforce
in interfaceSecurityEnforcer
- Returns:
true
if arguments failed enforcement criteria andSecurityEnforcer.enforce(com.atlassian.confluence.user.ConfluenceUser, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
should be called.
-
enforce
public void enforce(ConfluenceUser user, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
Description copied from interface:SecurityEnforcer
Enforcement action that should be taken whenSecurityEnforcer.shouldEnforce(com.atlassian.confluence.user.ConfluenceUser, com.atlassian.confluence.impl.webapp.security.MappedAction, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
returnstrue
.- Specified by:
enforce
in interfaceSecurityEnforcer
- Throws:
IOException
javax.servlet.ServletException
-
-