Skip to content

Commit

Permalink
Merge pull request #126 from bcgov/yj
Browse files Browse the repository at this point in the history
Yj
  • Loading branch information
ychung-mot authored Apr 15, 2024
2 parents 940e27e + 3b01672 commit d519970
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 25 deletions.
7 changes: 6 additions & 1 deletion server/StrDss.Service/EmailTemplates/BatchTakedownRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ public override string GetContent()
Subject = "Takedown Request";

return (Preview ? GetPreviewContent() : "") + $@"
<b>The platform is required to remove the listing within 8 days of the date it was delivered. If the platform fails to remove the listing, local governments can escalate the matter to the Director of the Provincial STR Compliance and Enforcement Unit at: [email protected].<br/><br/>
The short-term rental listings in the attached file are the subject of a request by a local government described under s. 18(3) of the <i>Short-Term Rental Accommodations Act</i> and s. 16 of the <i>Short-Term Rental Accommodations Regulation</i>. <br/><br/>
A “takedown request” (a request for a platform to cease providing platform services, e.g., removing a listing) has been submitted for each of these listings by the respective local government via the Province of British Columbia’s Short-term Rental (STR) Data Portal.<br/><br/>
In accordance with s. 18(3) of the <i>Short-Term Rental Accommodations Act</i> and s. 16 (3) of the <i>Short-Term Rental Accommodations Regulation</i>, please cease providing platform services in respect of the attached platform offers within 5 days from the date of receipt of this request.<br/><br/>
Failure to comply with this request could result in enforcement actions or penalties under the <i>Short-Term Rental Accommodations Act</i>.<br/><br/>
For more information on these requests, or local government short-term rental business licences, please contact the local government.<br/><br/>
For more information on the <i>Short-term Rental Accommodations Act</i>, please visit: <a href='https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals'>New rules for short-term rentals - Province of British Columbia (gov.bc.ca)</a><br/><br/>
This email has been automatically generated. Please do not reply to this email.
";
}
Expand Down
6 changes: 5 additions & 1 deletion server/StrDss.Service/EmailTemplates/NewAccessRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ public override string GetContent()
Subject = "STR Data Portal - New Access Request";

return
$@"New access request has been raised and requires review. {Link}";
$@"Hello,<br/><br/>
A new access request is waiting for you to approve.<br/><br/>
To approve or reject, please visit: {Link}<br/><br/>
Thank you.
";
}
}
}
15 changes: 9 additions & 6 deletions server/StrDss.Service/EmailTemplates/TakedownNotice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,19 @@ public TakedownNotice(IEmailMessageService emailService)
public string Comment { get; set; } = "";
public override string GetContent()
{
Subject = "Notice of Takedown of Short Term Rental Platform Offer";
Subject = "Notice of non-compliance with short-term rental business licence requirement";

return (Preview ? GetPreviewContent() : "") + $@"
Dear Short-term Rental Host,<br/><br/>
Short-term rental accommodations in your community must obtain a short-term rental (STR) business licence from the local government in order to operate.<br/><br/>
Short-term rental accommodations are also regulated by the Province of B.C. Under the Short-term Rental Accommodations Act, short-term rental hosts in communities with a short-term rental business licence requirement must include a valid business licence number on any short-term rental listings advertised on an online platform. Short-term rental platforms are required to remove listings that do not meet this requirement if requested by the local government.<br/><br/>
Dear Host,<br/><br/>
Short-term rental accommodations in your community are regulated by your local government.<br/><br/>
The local government has determined that the following short-term rental listing is not in compliance with an applicable local government business licence requirement:<br/><br/>
<b>{Url}</b><br/><br/>
Listing ID Number: <b>{ListingId}</b><br/><br/>
Unless you are able to demonstrate compliance with the business licence requirement, this listing may be removed from the short-term rental platform after 5 days. The local government has 90 days to submit a request to takedown the listing to the platform.<br/><br/>
{Comment}<br/>
Under the provincial <a href='https://www.bclaws.gov.bc.ca/civix/document/id/bills/billsprevious/4th42nd:gov35-1'>Short-Term Rental Accommodations Act</a> and its regulations, the local government may submit a request to the short-term rental platform to cease providing platform services (e.g., remove this listing from the platform) within a period of 5-90 days after the date of delivery of this Notice. Short-term rental platforms are required to comply with the local government’s request within 5 days of receiving the request.<br/><br/>
For more information on this Notice, or local government short-term rental business licences, please contact your local government.<br/><br/>
For more information on the Short-term Rental Accommodations Act, please visit: <a href='https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals'>New rules for short-term rentals - Province of British Columbia (gov.bc.ca)</a>.<br/><br/>
{ Comment}<br/><br/>
This email has been automatically generated. Please do not reply to this email. A copy of this Notice has been sent to the short-term rental platform.<br/><br/>
";
}
}
Expand Down
4 changes: 2 additions & 2 deletions server/StrDss.Service/EmailTemplates/TakedownRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public override string GetContent()
Subject = "Confirmation of Takedown Request";

return (Preview ? GetPreviewContent() : "") + $@"
<b>A takedown request for the following short-term rental listing was submitted to the STR Data Portal and will be delivered to the respective short-term rental platform at 11:50pm PST tonight:</b><br/><br/>
A takedown request for the following short-term rental listing was submitted to the Province of B.C.’s Short-term Rental Data Portal and will be delivered to the platform at 11:50pm PST tonight:<br/><br/>
<b>{Url}</b><br/><br/>
Listing ID Number: <b>{ListingId}</b><br/><br/>
The platform is required to remove the listing within 8 days of the date it was delivered. If the platform fails to remove the listing, local governments can escalate the matter to the Director of the Provincial STR Compliance and Enforcement Unit at: [email protected].<br/><br/>
Under the <a href='https://www.bclaws.gov.bc.ca/civix/document/id/bills/billsprevious/4th42nd:gov35-1'>Short-Term Rental Accommodations Act</a> and its regulations, the platform is required to comply with the request within 5 days from the date of receipt of the request. If the platform fails to comply with the request (e.g., remove the listing), local governments can escalate the matter to the Director of the Provincial STR Compliance and Enforcement Unit at: <a href='mailto: [email protected]'>[email protected]</a>.<br/><br/>
This email has been automatically generated. Please do not reply to this email.
";
}
Expand Down
30 changes: 15 additions & 15 deletions server/StrDss.Service/UserService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,21 @@ public async Task<Dictionary<string, List<string>>> CreateAccessRequestAsync(Acc
return errors;
}

//if (_currentUser.IdentityProviderNm == StrDssIdProviders.BceidBusiness)
//{
// var (error, account) = await _bceid.GetBceidAccountCachedAsync(_currentUser.UserGuid, "", StrDssIdProviders.BceidBusiness, _currentUser.UserGuid, _currentUser.IdentityProviderNm);

// if (account == null)
// {
// _logger.LogError($"BCeID call error: {error}");
// }

// if (account != null)
// {
// _currentUser.FirstName = account.FirstName;
// _currentUser.LastName = account.LastName;
// }
//}
if (_currentUser.IdentityProviderNm == StrDssIdProviders.BceidBusiness)
{
var (error, account) = await _bceid.GetBceidAccountCachedAsync(_currentUser.UserGuid, "", StrDssIdProviders.BceidBusiness, _currentUser.UserGuid, _currentUser.IdentityProviderNm);

if (account == null)
{
_logger.LogError($"BCeID call error: {error}");
}

if (account != null)
{
_currentUser.FirstName = account.FirstName;
_currentUser.LastName = account.LastName;
}
}

if (userDto == null)
{
Expand Down

0 comments on commit d519970

Please sign in to comment.