Examples of revokeImpersonation()


Examples of org.apache.jackrabbit.api.security.user.Impersonation.revokeImpersonation()

            assertTrue(uImpl.grantImpersonation(otherP));
            save(otherSession);

            assertTrue(uImpl.allows(buildSubject(otherP)));

            uImpl.revokeImpersonation(otherP);
            save(otherSession);
        } else {
            throw new NotExecutableException("Cannot execute test. OtherP can already impersonate UID-user.");
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Impersonation.revokeImpersonation()

            assertTrue(uImpl.grantImpersonation(otherP));
            save(otherSession);

            assertTrue(uImpl.allows(buildSubject(otherP)));

            uImpl.revokeImpersonation(otherP);
            save(otherSession);
        } else {
            throw new NotExecutableException("Cannot execute test. OtherP can already impersonate UID-user.");
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Impersonation.revokeImpersonation()

        assertTrue(impers.grantImpersonation(otherP));
        save(uSession);

        assertTrue(impers.allows(buildSubject(otherP)));

        assertTrue(impers.revokeImpersonation(otherP));
        save(uSession);

        assertFalse(impers.allows(buildSubject(otherP)));
    }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Impersonation.revokeImpersonation()

        Impersonation uImpl = u.getImpersonation();
        if (!uImpl.allows(buildSubject(otherP))) {
            // ... trying to modify 'impersonators of another user must succeed
            assertTrue(uImpl.grantImpersonation(otherP));
            assertTrue(uImpl.allows(buildSubject(otherP)));
            uImpl.revokeImpersonation(otherP);
        } else {
            throw new NotExecutableException("Cannot execute test. OtherP can already impersonate UID-user.");
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Impersonation.revokeImpersonation()

            Impersonation impers = ((User) himself).getImpersonation();

            assertFalse(impers.allows(buildSubject(p)));
            assertTrue(impers.grantImpersonation(p));
            assertTrue(impers.allows(buildSubject(p)));
            assertTrue(impers.revokeImpersonation(p));
            assertFalse(impers.allows(buildSubject(p)));

        } finally {
            // let superuser do clean up.
            child.remove();
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Impersonation.revokeImpersonation()

                        } // else: no need to revoke impersonation for the given principal.
                    }

                    // 2. adjust set of impersonators
                    for (Principal princ : toRemove.values()) {
                        if (!imp.revokeImpersonation(princ)) {
                            handleFailure("Failed to revoke impersonation for " + princ.getName() + " on " + a);
                        }
                    }
                    for (Principal princ : toAdd) {
                        if (!imp.grantImpersonation(princ)) {
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Impersonation.revokeImpersonation()

                        } // else: no need to revoke impersonation for the given principal.
                    }

                    // 2. adjust set of impersonators
                    for (Principal princ : toRemove.values()) {
                        if (!imp.revokeImpersonation(princ)) {
                            handleFailure("Failed to revoke impersonation for " + princ.getName() + " on " + a);
                        }
                    }
                    for (Principal princ : toAdd) {
                        if (!imp.grantImpersonation(princ)) {
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Impersonation.revokeImpersonation()

            Impersonation impers = ((User) himself).getImpersonation();

            assertFalse(impers.allows(buildSubject(p)));
            assertTrue(impers.grantImpersonation(p));
            assertTrue(impers.allows(buildSubject(p)));
            assertTrue(impers.revokeImpersonation(p));
            assertFalse(impers.allows(buildSubject(p)));

        } finally {
            // let superuser do clean up.
            child.remove();
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Impersonation.revokeImpersonation()

                assertFalse(uImpl.grantImpersonation(otherP));
            } catch (AccessDeniedException e) {
                // success
            } finally {
                assertFalse(uImpl.allows(buildSubject(otherP)));
                uImpl.revokeImpersonation(otherP);
            }
        } else {
            throw new NotExecutableException("Cannot execute test. OtherP can already impersonate UID-user.");
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Impersonation.revokeImpersonation()

        Impersonation uImpl = u.getImpersonation();
        if (!uImpl.allows(buildSubject(otherP))) {
            // ... trying to modify 'impersonators of another user must succeed
            assertTrue(uImpl.grantImpersonation(otherP));
            assertTrue(uImpl.allows(buildSubject(otherP)));
            uImpl.revokeImpersonation(otherP);
        } else {
            throw new NotExecutableException("Cannot execute test. OtherP can already impersonate UID-user.");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.