Package org.apache.lenya.cms.ac

Examples of org.apache.lenya.cms.ac.Identity


                if (session == null) {
                    return false;
                }

                Identity identity = new Identity(idoc);

                if (getLogger().isDebugEnabled()) {
                    getLogger().debug("IDENTITY: " + identity);
                }
View Full Code Here


            getLogger().error(".act(): No session object");

            return null;
        }

        Identity identity = (Identity) session.getAttribute("org.apache.lenya.cms.ac.Identity");
        getLogger().debug(".act(): Identity: " + identity);

        String docId = request.getParameter("documentid");
        filename =publication.getEnvironment().getAuthoringPath() + "/" +docId ;
        getLogger().debug(".act(): publicationAuthPath + docId : " + publication.getEnvironment().getAuthoringPath() +" : " +docId );
        username = null;

        if (identity != null) {
            username = identity.getUsername();
        } else {
            getLogger().error(".act(): No identity yet");
        }

        getLogger().debug(".act(): Username: " + username);
View Full Code Here

                if (session == null) {
                    throw new Exception("No session");
                }

                Identity identity = (Identity) session.getAttribute("org.apache.lenya.cms.ac.Identity");
                rc.reservedCheckIn(xmlRoot + "/" + relativeFilename, identity.getUsername(), true);

                FileUtil.copyFile(tempFile, permFile);
            } catch (Exception e) {
                getLogger().error(".act(): Exception during checkin of " + xmlRoot + "/" +relativeFilename + " (" + e +")");
                return null;
View Full Code Here

                if (session == null) {
                    throw new Exception("No session");
                }

                Identity identity = (Identity) session.getAttribute("org.apache.lenya.cms.ac.Identity");
                getLogger().debug(".act(): Checkin: " + reqFile + "::" + identity.getUsername());
                rc.reservedCheckIn(xmlRoot + reqFile, identity.getUsername(), true);
                FileUtil.copyFile(tempFile, permFile);
            } catch (Exception e) {
                getLogger().error(".act(): Exception during checkin of " + xmlRoot + reqFile + " (" + e + ")");
                return null;
            }
View Full Code Here

         super(test);
        try {
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            DocumentBuilder db = dbf.newDocumentBuilder();
            doc = db.parse(new FileInputStream("/home/michi/src/lenya/src/webapp/lenya/pubs/oscom/config/ac/passwd/lenya.iml"));
            identity = new Identity(doc);
            //new org.apache.lenya.xml.DOMWriter(System.out).printWithoutFormatting(identity.createDocument());
        } catch (Exception e) {
            System.err.println(e);
        }
     }
View Full Code Here

            getLogger().warn(".authorize(): Permission denied");
            return false;
        }


        Identity identity = (Identity) session.getAttribute("org.apache.lenya.cms.ac.Identity");

        if (identity != null) {
            if (policy.authorizeUser(action, identity.getUsername())) {
                return true;
            }

            String[] groupname = identity.getGroupnames();

            for (int i = 0; i < groupname.length; i++) {
                if (policy.authorizeGroup(action, groupname[i])) {
                    return true;
                }
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.ac.Identity

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.