File D:\maven-qcr-plugin-testsunitaires\qcr4java\jenkins-master\target\site\qc\core\src\main\java\hudson\security\AccessDeniedException2.java.html

1 package hudson.security;
2
3 import org.acegisecurity.AccessDeniedException;
4 import org.acegisecurity.Authentication;
5
6 /**
7 * {@link AccessDeniedException} with more information.
8 * @author Kohsuke Kawaguchi
9 */
10 public class AccessDeniedException2 extends AccessDeniedException {
11 /**
12 * This object represents the user being authenticated.
13 */
14 public final Authentication authentication;
15
16 /**
17 * This object represents the permission that the user needed.
18 */
19 public final Permission permission;
20
21 public AccessDeniedException2(Authentication authentication, Permission permission) {
22 this(null,authentication,permission);
23 }
24
25 public AccessDeniedException2(Throwable t, Authentication authentication, Permission permission) {
26 super(Messages.AccessDeniedException2_MissingPermission(authentication.getName(),permission.name), t);
27 this.authentication = authentication;
28 this.permission = permission;
29 }
30 }
31