Package org.exist.security

Examples of org.exist.security.EffectiveSubject


        context.prepareForExecution();
       
        final Subject callingUser = broker.getSubject();

        //if setUid or setGid, become Effective User
        EffectiveSubject effectiveSubject = null;
        final Source src = expression.getContext().getSource();
        if(src instanceof DBSource) {
            final DBSource dbSrc = (DBSource)src;
            final Permission perm = dbSrc.getPermissions();

            if(perm.isSetUid()) {
                if(perm.isSetGid()) {
                    //setUid and SetGid
                    effectiveSubject = new EffectiveSubject(perm.getOwner(), perm.getGroup());
                } else {
                    //just setUid
                    effectiveSubject = new EffectiveSubject(perm.getOwner());
                }
            } else if(perm.isSetGid()) {
                //just setGid, so we use the current user as the effective user
                effectiveSubject = new EffectiveSubject(callingUser, perm.getGroup());
            }
        }
       
        try {
            if(effectiveSubject != null) {
View Full Code Here

TOP

Related Classes of org.exist.security.EffectiveSubject

Copyright © 2018 www.massapicom. 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.