Greetings! I have a problem setting an authorization permission in an application

I tweaked a bit the files from the Java Authorization tutorial, found here:
JAAS Authorization Tutorial

What I want is to implement a permission rule on the SampleAzn class, I want a
particular user, namely admin, to be able to run the doAsPrivileged instruction within the SampleAzn code

SampleAzn code:

Subject mySubject = lc.getSubject();
// let's see what Principals we have
Iterator principalIterator = mySubject.getPrincipals().iterator();
System.out.println("Authenticated user has the following Principals:");

PrivilegedAction action = new usePrintServer( current_principal );
Subject.doAsPrivileged(mySubject, action, null);

the user admin, has been authenticated, and the next method to be executed is doAsPrivileged. admin is added as a principal in the Subject

Below, is the policy file I use, concerning the SampleAzn class

grant codebase "file:./SampleAzn.jar" {
permission javax.security.auth.AuthPermission "createLoginContext.Sample";
// permission javax.security.auth.AuthPermission "doAsPrivileged";
};

grant codebase "file:./SampleAzn.jar",
Principal sample.principal.SamplePrincipal "admin" {

permission javax.security.auth.AuthPermission "getSubject";
permission javax.security.auth.AuthPermission "createLoginContext.Sample";
permission javax.security.auth.AuthPermission "doAsPrivileged";
};


What I want, is to make admin the only principal who is able to execute the doAsPrivileged instruction. If I remove the // characters, the code runs file, since no authorization is applied on SampleAzn. But with the comments, the output is the following exception:

Authenticated user has the following Principals:
SamplePrincipal: admin
User has 0 Public Credential(s)
Exception in thread "main" java.security.AccessControlException: access denied (javax.security.auth.AuthPermission doAsPrivileged)
at java.security.AccessControlContext.checkPermission (AccessControlContext.java:323)
at java.security.AccessController.checkPermission(Acc essController.java:546)
at java.lang.SecurityManager.checkPermission(Security Manager.java:532)
at javax.security.auth.Subject.doAsPrivileged(Subject .java:439)
at sample.SampleAzn.main(SampleAzn.java:154)


What could be wrong? Is there a way to fix this, while the principal admin has exclusive execution rights??

Thanx for your time