Exemple #1
0
        public void TestValidUserWithoutPermissions()
        {
            var ats            = _integrationQuery.GetIntegrationSystem <Ats>(_jobG8Query.GetIntegratorUser().IntegrationSystemId);
            var integratorUser = new IntegratorUser
            {
                LoginId             = "JobAdFeedTestUser",
                PasswordHash        = LoginCredentials.HashToString(Password),
                Permissions         = IntegratorPermissions.GetJobApplication,
                IntegrationSystemId = ats.Id,
            };

            _integrationCommand.CreateIntegratorUser(integratorUser);

            var request = new PostAdvertRequestMessage
            {
                UserCredentials = new Credentials
                {
                    Username = "******",
                    Password = Password
                }
            };

            var employer = CreateEmployer(0);

            PostAdvert(employer, request);
        }
Exemple #2
0
        string IExternalJobAdsQuery.GetRedirectName(MemberJobAdView jobAd)
        {
            //return the company name for JXT; return the integrator use name otherwise
            if (jobAd.Integration.IntegratorUserId == _jxtIntegratorUserId)
            {
                return(jobAd.ContactDetails.CompanyName);
            }

            return(_integrationQuery.GetIntegrationSystem <Ats>(
                       _integrationQuery.GetIntegratorUser(jobAd.Integration.IntegratorUserId.Value).IntegrationSystemId).
                   Name);
        }