Package org.jenkinsci.plugins.activiti_explorer.dto

Examples of org.jenkinsci.plugins.activiti_explorer.dto.UserDTO


    public void doDynamic(StaplerRequest req, StaplerResponse rsp) throws ServletException, IOException {
        ProxiedWebApplication webApp = getProxyWebApplication(req);

        HttpSession session = req.getSession();
        HttpSession ps = webApp.getProxiedSession(session);
        UserDTO oldUser = (UserDTO)ps.getAttribute("jenkins.user");
        UserDTO newUser = createUserInfo();
        if (!mapToId(oldUser).equals(mapToId(newUser))) {
            // force a new session. AE isn't designed to anticipate the user change without invalidating a session,
            // but Jenkins does that. So when we see that the user has changed in Jenkins, force a new session
            // (but only in AE.)
            webApp.clearProxiedSession(session);
View Full Code Here


     */
    private UserDTO createUserInfo() {
        Authentication a = Jenkins.getAuthentication();
        User u = User.current();

        UserDTO user = new UserDTO();
        user.id = a.getName();
        user.firstName = u != null ? u.getFullName() : a.getName();
        user.lastName = "";
        user.fullName = u != null ? u.getFullName() : a.getName();
        user.isAdmin = Jenkins.getInstance().getACL().hasPermission(a,Jenkins.ADMINISTER);
View Full Code Here

TOP

Related Classes of org.jenkinsci.plugins.activiti_explorer.dto.UserDTO

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.