예제 #1
0
 internal void doTheAuthorize(AbstractCredentials credentials, AbstractPermission permission)
 {
     //// if we are requesting CPRS context with a visit and user does not have it - add it to their account
     if (permission.Name == VistaConstants.CPRS_CONTEXT &&
         !Cxn.Account.Permissions.ContainsKey(VistaConstants.CPRS_CONTEXT) &&
         !Cxn.Account.AuthenticationMethod.Equals(VistaConstants.LOGIN_CREDENTIALS))
     {
         addContextInVista(Cxn.Uid, permission);
     }
     else
     {
         setContext(permission);
     }
     if (String.IsNullOrEmpty(Cxn.Uid))
     {
         if (String.IsNullOrEmpty(credentials.FederatedUid))
         {
             throw new MdoException("Missing federated UID, cannot get local UID");
         }
         VistaUserDao dao = new VistaUserDao(Cxn);
         Cxn.Uid = dao.getUserIdBySsn(credentials.FederatedUid);
         if (String.IsNullOrEmpty(Cxn.Uid))
         {
             throw new MdoException("Unable to get local UID for federated ID " + credentials.FederatedUid);
         }
     }
     if (!credentials.Complete)
     {
         VistaUserDao dao = new VistaUserDao(Cxn);
         dao.addVisitorInfo(credentials);
     }
 }
예제 #2
0
        public override bool success(string[] flds)
        {
            AbstractPermission ddrContext = new MenuOption(VistaConstants.DDR_CONTEXT);

            acct.setContext(ddrContext);

            VistaUserDao dao = new VistaUserDao(cxn);

            cxn.Uid = dao.getUserIdBySsn(creds.FederatedUid);

            return(true);
        }
예제 #3
0
        public override bool success(string[] flds)
        {
            // Set DDR context in order to add the requested context
            AbstractPermission ddrContext = new MenuOption(VistaConstants.DDR_CONTEXT);

            acct.setContext(ddrContext);

            // Get the UID while we have DDR context set anyway
            VistaUserDao dao = new VistaUserDao(cxn);

            cxn.Uid = dao.getUserIdBySsn(creds.FederatedUid);

            // Add the requested context to the user's account
            //acct.addContextInVista(cxn.Uid, acct.PrimaryPermission);

            return(true);
        }