question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I make the tenancyName case insensitive?

See original GitHub issue

https://github.com/aspnetboilerplate/aspnetboilerplate/blob/bc266e3503fcb2825684ec829cc356815f94f397/src/Abp.Zero.Common/MultiTenancy/TenantCache.cs#L111-L118

For now, the tenancyName is case sensitive. But I don’t think it should be that.

In my case, I used DomainTenantResolveContributer to resolve tenant by domain, and now, I can got tenant “Default” with “http://Default.mydomain.com” but not with “http://default.mydomain.com”.

And I don’t know why my browser always keeps the host lowercase in the address bar, even though I typed in uppercase.

I don’t think most users can distinguish case of the host.

So why don’t we make the Tenant like the User or Role that identify by a normalized name? How can I make the tenancyName case insensitive in current abp?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
PMExtracommented, Aug 19, 2018

@Mardoxx I’m using PostgreSQL, but I think most of SQL will translate the == to case sensitive comparison.

1reaction
malimingcommented, Aug 19, 2018

I think the standardized Tenant name is better. Before discussing the results, you can rewrite https://github.com/aspnetboilerplate/aspnetboilerplate/blob/bc266e3503fcb2825684ec829cc356815f94f397/src/Abp.Zero.Common/MultiTenancy/TenantCache.cs#L110-L119 GetTenantOrNull(string tenancyName)

return _tenantRepository.GetAll().ToList().FirstOrDefault(t => t.TenancyName.Equals(tenancyName, StringComparison.CurrentCultureIgnoreCase)); 
Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow case-insensitive tenant names in ShellHost, Lombiq ...
A new HttpBackgroundJob helper component, allow case-insensitive tenant names in ShellHost , and a demo about the Lombiq PowerShell ...
Read more >
Manage tenants-Azure Sphere
Names are case sensitive. When you create a tenant, the Azure Sphere Security Service records the device ID of the attached device.
Read more >
How to enable case-insensitive property name matching ...
Learn how to enable case-insensitive property name matching while serializing to and deserializing from JSON in .NET.
Read more >
sql server - Case Sensitive join TSQL
I have a simple left outer join to a table that is returning an ID. My code is as. Select distinct TenantID ,Name...
Read more >
[Dev] Make tenant domain names case insensitive
[Dev] Make tenant domain names case insensitive ... Hi All, How do we $subject ? thanks, -- Supun Malinga, Senior Software Engineer, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found