处理数据窗口中的数据库列权限

发布于 2024-10-04 18:19:25 字数 250 浏览 4 评论 0原文

如何处理数据窗口中的数据库列权限以避免“列上的 SELECT 权限被拒绝”...

我有一个显示表列的数据窗口,用户/角色权限对于某些列有所不同,并根据业务规则进行设置数据库级别以避免覆盖应用程序权限...

问题是登录系统的用户如果对某些列没有“选择权限”,将收到一条错误消息“在列 xyz 上选择权限被拒绝...”,并且数据窗口将不检索任何信息,而不是仅检索具有“选择”权限的列的行...

有谁知道如何在类似情况下使用数据窗口处理列权限?

How to handle DB column privileges in datawindows to avoid getting "SELECT permission denied on column"....

I have a datawindow that displays table columns, the users/roles permissions differ for certain columns and are set as per the business rules on the database level to avoid overriding application permissions...

the problem is the users logged in the system who do not have "select privilege" on certain columns will receive an error message "select permission denied on column xyz..." and the datawindow will not retrieve any information istead of retrieving only the rows for columns have "select" privilege to...

does anyone knows how to handle the columns permissions with datawindow for similar cases?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓝眼泪 2024-10-11 18:19:25

据我所知,没有简单的方法可以处理这个问题。

不确定您是否在寻找想法,但这取决于有多少可能的变化以及您想要制定解决方案的动态程度。

我从未在 DBMS 级别使用列级别权限的商店工作过,但假设有一些列组被锁定用于各种角色。如果存在少量(例如 3 个)变体,那么我可能只会制作该数据对象的三个版本,并在检索之前换出适当的版本。

否则,更困难的选择是在按角色或以某种方式查询系统表进行检索之前动态修改数据对象。

我从未尝试过且不确定它是否有效的另一个想法是从 SQL 动态创建数据对象,我相信该函数称为 createfromsql,并且只需使用 select * from xyz 但这仅在仅用于显示时才可行否则,您将需要进行大量动态修改以使数据对象可更新并设置所有可更新列。

祝你好运。

There is no easy way to handle this that that I've seen.

Not sure if you are looking for ideas or not, but it kind of depends on how many possible variations there are and how dynamic you want to make the solution.

I've never worked in a shop that used column level permissions at DBMS level but assume there are groups of columns locked out for various roles. If there were a handful (say 3) variations then I'd probably just make three versions of the dataobject and swap out the appropriate one prior to retrieval.

Otherwise the more difficult option would be to dynamically modify the dataobject prior to retrieval either by role or by somehow querying the system tables.

Another idea that I've never tried and not sure if it would work is to dynamically create the dataobject from SQL, I believe the function is called createfromsql, and just use select * from xyz but that would only be feasible if it's for display only otherwise you'd have a lot of dynamic modifications to make the dataobject updateable and set all the updateable columns.

Good luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文