<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Row Level Security Groups - AugSQL				            </title>
            <link>https://www.augforums.com/forums/augsql/row-level-security-groups/</link>
            <description>Acumatica User Group Forums</description>
            <language>en-US</language>
            <lastBuildDate>Mon, 11 May 2026 16:09:11 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>Row Level Security Groups</title>
                        <link>https://www.augforums.com/forums/augsql/row-level-security-groups/#post-11535</link>
                        <pubDate>Sat, 08 Feb 2025 07:12:51 +0000</pubDate>
                        <description><![CDATA[I haven&#039;t had a chance to test this personally, but a friend sent this to me and he knows his stuff so I&#039;m comfortable posting it here.
Row Level security information gets stored in a compl...]]></description>
                        <content:encoded><![CDATA[<p>I haven't had a chance to test this personally, but a friend sent this to me and he knows his stuff so I'm comfortable posting it here.</p>
<p>Row Level security information gets stored in a complicated format in the Acumatica database so it's hard to report on with SQL.</p>
<p>Here are two SQL Views that can help you to untangle the mystery:</p>
<pre contenteditable="false">CREATE OR ALTER VIEW dbo.RDPViewsUserRelationGroups AS
select
      U.CompanyID,
      U.Username,
      RG.GroupName,
      RG.Description
from Users U
      left outer join RelationGroup RG on RG.CompanyID = U.CompanyID and (
            CONVERT(BIGINT, substring(RG.GroupMask, 1, 4)) &amp; CONVERT(BIGINT, substring(U.GroupMask, 1, 4)) != 0 or
            CONVERT(BIGINT, substring(RG.GroupMask, 5, 4)) &amp; CONVERT(BIGINT, substring(U.GroupMask, 5, 4)) != 0 or
            CONVERT(BIGINT, substring(RG.GroupMask, 9, 4)) &amp; CONVERT(BIGINT, substring(U.GroupMask, 9, 4)) != 0 or
            CONVERT(BIGINT, substring(RG.GroupMask, 13, 4)) &amp; CONVERT(BIGINT, substring(U.GroupMask, 13, 4)) != 0
      )</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<pre contenteditable="false">CREATE OR ALTER VIEW dbo.RDPViewsCustomerRelationGroups AS
select
      BA.CompanyID,
      BA.BAccountID,
      BA.AcctCD,
      BA.AcctName,
      RG.GroupName,
      RG.Description
from Customer C
      inner join BAccount BA on BA.CompanyID = C.CompanyID and BA.BAccountID = C.BAccountID
      left outer join RelationGroup RG on RG.CompanyID = C.CompanyID and (
            CONVERT(BIGINT, substring(RG.GroupMask, 1, 4)) &amp; CONVERT(BIGINT, substring(C.GroupMask, 1, 4)) != 0 or
            CONVERT(BIGINT, substring(RG.GroupMask, 5, 4)) &amp; CONVERT(BIGINT, substring(C.GroupMask, 5, 4)) != 0 or
            CONVERT(BIGINT, substring(RG.GroupMask, 9, 4)) &amp; CONVERT(BIGINT, substring(C.GroupMask, 9, 4)) != 0 or
            CONVERT(BIGINT, substring(RG.GroupMask, 13, 4)) &amp; CONVERT(BIGINT, substring(C.GroupMask, 13, 4)) != 0
      )</pre>]]></content:encoded>
						                            <category domain="https://www.augforums.com/forums/augsql/">AugSQL</category>                        <dc:creator>Tim Rodman</dc:creator>
                        <guid isPermaLink="true">https://www.augforums.com/forums/augsql/row-level-security-groups/#post-11535</guid>
                    </item>
							        </channel>
        </rss>
		