Projects >> uPortal >>ebfe0b50493c8a7274d8a7a0201f9ccfadc349d0

Chunk
Conflicting content
    private CriteriaQuery findMessageByCodeAndLocaleQuery;
    private CriteriaQuery findMessageByCodeQuery;
    private CriteriaQuery findMessageByLocaleQuery;
<<<<<<< HEAD
=======
    
    private CriteriaQuery findCodes;
    
>>>>>>> b4190afbf721d8c5f2a8a4f3ceb0833440fb86be
    private ParameterExpression codeParameter;
    private ParameterExpression localeParameter;
    private EntityManager entityManager;
Solution content
    private CriteriaQuery findMessageByCodeAndLocaleQuery;
    private CriteriaQuery findMessageByCodeQuery;
    private CriteriaQuery findMessageByLocaleQuery;
    private CriteriaQuery findCodes;
    
    private ParameterExpression codeParameter;
    private ParameterExpression localeParameter;
    private EntityManager entityManager;
File
JpaMessageDao.java
Developer's decision
Version 2
Kind of conflict
Attribute
Chunk
Conflicting content
import org.jasig.portal.IUserIdentityStore;
import org.jasig.portal.IUserProfile;
import org.jasig.portal.PortalException;
<<<<<<< HEAD
import org.jasig.portal.UserIdentityStoreFactory;
import org.jasig.portal.events.IPortalEventFactory;
=======
>>>>>>> b4190afbf721d8c5f2a8a4f3ceb0833440fb86be
import org.jasig.portal.layout.IFolderLocalNameResolver;
import org.jasig.portal.layout.IUserLayout;
import org.jasig.portal.layout.IUserLayoutManager;
Solution content
import org.jasig.portal.IUserIdentityStore;
import org.jasig.portal.IUserProfile;
import org.jasig.portal.PortalException;
import org.jasig.portal.events.IPortalEventFactory;
import org.jasig.portal.layout.IFolderLocalNameResolver;
import org.jasig.portal.layout.IUserLayout;
import org.jasig.portal.layout.IUserLayoutManager;
File
DistributedLayoutManager.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jasig.portal.AuthorizationException;
<<<<<<< HEAD
import org.jasig.portal.IUserIdentityStore;
import org.jasig.portal.events.IPortalEventFactory;
=======
import org.jasig.portal.events.EventPublisherLocator;
import org.jasig.portal.events.support.UserLoggedInPortalEvent;
>>>>>>> b4190afbf721d8c5f2a8a4f3ceb0833440fb86be
import org.jasig.portal.properties.PropertiesManager;
import org.jasig.portal.security.IAdditionalDescriptor;
import org.jasig.portal.security.IOpaqueCredentials;
Solution content
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jasig.portal.AuthorizationException;
import org.jasig.portal.IUserIdentityStore;
import org.jasig.portal.events.IPortalEventFactory;
import org.jasig.portal.properties.PropertiesManager;
import org.jasig.portal.security.IAdditionalDescriptor;
import org.jasig.portal.security.IOpaqueCredentials;
File
Authentication.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
        //Set the principals and credentials for the security context chain
        this.configureSecurityContextChain(principals, credentials, person, securityContext, BASE_CONTEXT_NAME);

<<<<<<< HEAD
        // NOTE: The LoginServlet looks in the security.properties file to
        // determine what tokens to look for that represent the principals and
        // credentials for each context. It then retrieves the values from the request
        // and stores the values in the principals and credentials HashMaps that are
        // passed to the Authentication service.
=======
      // Attempt to authenticate the user
      final long start = System.currentTimeMillis();
      securityContext.authenticate();
      final long elapsed = System.currentTimeMillis() - start;
      // Check to see if the user was authenticated
      if (securityContext.isAuthenticated()) {
         lastAuthentication = authenticationTimes.add(elapsed); // metric
         // Add the authenticated username to the person object
         // the login name may have been provided or reset by the security provider
         // so this needs to be done after authentication.
         person.setAttribute(IPerson.USERNAME, securityContext.getPrincipal().getUID());
         // Retrieve the additional descriptor from the security context
         IAdditionalDescriptor addInfo = person.getSecurityContext().getAdditionalDescriptor();
         // Process the additional descriptor if one was created
         if (addInfo != null) {
            // Replace the passed in IPerson with the additional descriptor if the
            // additional descriptor is an IPerson object created by the security context
            // NOTE: This is not the preferred method, creation of IPerson objects should be
            //       handled by the PersonManager.
            if (addInfo instanceof IPerson) {
               IPerson newPerson = (IPerson)addInfo;
               person.setFullName(newPerson.getFullName());
               for (Enumeration e = newPerson.getAttributeNames(); e.hasMoreElements();) {
                  String attributeName = (String)e.nextElement();
                  person.setAttribute(attributeName, newPerson.getAttribute(attributeName));
               }
               resetEntityIdentifier(person, newPerson);
            }
            // If the additional descriptor is a map then we can
            // simply copy all of these additional attributes into the IPerson
            else if (addInfo instanceof Map) {
               // Cast the additional descriptor as a Map
               Map additionalAttributes = (Map)addInfo;
               // Copy each additional attribute into the person object
               for (Iterator keys = additionalAttributes.keySet().iterator(); keys.hasNext();) {
                  // Get a key
                  String key = (String)keys.next();
                  // Set the attribute
                  person.setAttribute(key, additionalAttributes.get(key));
               }
            }
            else if (addInfo instanceof ChainingSecurityContext.ChainingAdditionalDescriptor) {
                // do nothing
            }
            else {
                if (log.isWarnEnabled())
                    log.warn("Authentication Service recieved " +
                            "unknown additional descriptor [" + addInfo + "]");
            }
         }
         // Populate the person object using the PersonDirectory if applicable
         if (PropertiesManager.getPropertyAsBoolean("org.jasig.portal.services.Authentication.usePersonDirectory")) {
            // Retrieve all of the attributes associated with the person logging in
            final IPersonAttributeDao pa = PersonAttributeDaoLocator.getPersonAttributeDao();
            final String username = this.getUsername(person);
            final IPersonAttributes personAttributes = pa.getPerson(username);
>>>>>>> b4190afbf721d8c5f2a8a4f3ceb0833440fb86be

        // Attempt to authenticate the user
        final long start = System.currentTimeMillis();
Solution content
        //Set the principals and credentials for the security context chain
        this.configureSecurityContextChain(principals, credentials, person, securityContext, BASE_CONTEXT_NAME);

        // NOTE: The LoginServlet looks in the security.properties file to
        // determine what tokens to look for that represent the principals and
        // credentials for each context. It then retrieves the values from the request
        // and stores the values in the principals and credentials HashMaps that are
        // passed to the Authentication service.

        // Attempt to authenticate the user
        final long start = System.currentTimeMillis();
File
Authentication.java
Developer's decision
Version 1
Kind of conflict
Attribute
Comment
If statement
Method invocation
Variable
Chunk
Conflicting content
                log.error("Exception retrieving ID", ae);
                throw new PortalSecurityException("Authentication Service: Exception retrieving UID");
            }
<<<<<<< HEAD
=======
         }
         // Find the uPortal userid for this user or flunk authentication if not found
         // The template username should actually be derived from directory information.
         // The reference implemenatation sets the uPortalTemplateUserName to the default in
         // the portal.properties file.
         // A more likely template would be staff or faculty or undergraduate.
         boolean autocreate = PropertiesManager.getPropertyAsBoolean("org.jasig.portal.services.Authentication.autoCreateUsers");
         // If we are going to be auto creating accounts then we must find the default template to use
         if (autocreate && person.getAttribute("uPortalTemplateUserName") == null) {
            String defaultTemplateUserName = PropertiesManager.getProperty("org.jasig.portal.services.Authentication.defaultTemplateUserName");
            person.setAttribute("uPortalTemplateUserName", defaultTemplateUserName);
         }
         try {
            // Attempt to retrieve the UID
            int newUID = UserIdentityStoreLocator.getUserIdentityStore().getPortalUID(person,
                  autocreate);
            person.setID(newUID);
         } catch (AuthorizationException ae) {
            log.error("Exception retrieving ID", ae);
            throw  new PortalSecurityException("Authentication Service: Exception retrieving UID");
         }

         //TODO add IPerson cache

         // Record the successful authentication
         EventPublisherLocator.getApplicationEventPublisher().publishEvent(new UserLoggedInPortalEvent(this, person));
      }
   }
>>>>>>> b4190afbf721d8c5f2a8a4f3ceb0833440fb86be

            this.portalEventFactory.publishLoginEvent(request, this, person);
        }
Solution content
                log.error("Exception retrieving ID", ae);
                throw new PortalSecurityException("Authentication Service: Exception retrieving UID");
            }

            this.portalEventFactory.publishLoginEvent(request, this, person);
        }
File
Authentication.java
Developer's decision
Version 1
Kind of conflict
Comment
If statement
Method invocation
Try statement
Variable