You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if we setup SELECT (row) permissions in a table which consists of a column with custom data type wrapped behind tinyint data type, it will throw below error:
Any possible solutions/workarounds you're aware of?
One such workaround as advised from the engineering team is to create a view off that table with that column casted to some different data type like VARCHAR.
I created view. Note that I used CAST function from MSSQL server to cast customd data type column into VARCHAR in new updated view.
CREATEVIEWtenant_info_viewASSELECT
CAST(id ASVARCHAR(100)) AS tenant_id,
first_name,
phone
FROM tenant;
Now you can use that tenant_id in permissions, since you'll need to setup permissions in view rather than in the original table.
Keywords
mssql tinyint permissions custom
The text was updated successfully, but these errors were encountered:
Version Information
Server Version: 2.39.1
Environment
Cloud
What is the current behaviour?
Currently, if we setup SELECT (row) permissions in a table which consists of a column with custom data type wrapped behind
tinyint
data type, it will throw below error:In my case , I had a table with column name
id
and it's data type wasbCompany
which was in turn a custom data type wrapped behindtinyint
data type.What is the expected behaviour?
Well I am not sure what the real issue here it be. It might be
tinyint
data type column in permission logicExpected behavior can be one of the below
How to reproduce the issue?
I created custom data type:
Here's the
tenant
table schemaNote that bCompany is custom datatype created from tinyint type.
I setup row SELECT permissions as
And then I performed the query which produced the above mentioned error as stated in 3rd section
my request headers
Any possible solutions/workarounds you're aware of?
One such workaround as advised from the engineering team is to create a view off that table with that column casted to some different data type like
VARCHAR
.I created view. Note that I used CAST function from MSSQL server to cast customd data type column into VARCHAR in new updated view.
Now you can use that tenant_id in permissions, since you'll need to setup permissions in view rather than in the original table.
Keywords
mssql tinyint permissions custom
The text was updated successfully, but these errors were encountered: