title: How to Check if User has User Level create Privilege on particular Entity through javascript?
body: <p>I have a requirement to check if logged in user has User Level Create privilege on particular entity specified in Security Role.</p>
  
  <p>I have tried the javascript as well that retrieves the Privilege entity and that checks for privilege but not working as per the expectation.</p>
  
  <p>The javascript retrieves the roles of the user and privilege but it shows canbedeep, canbelocal, canbeglobal to true even if user role have only user level create privilege. </p>
  
  <pre><code>'&lt;fetch mapping="logical" &gt;',
  '&lt;entity name="role"&gt;',
      '&lt;attribute name="name" /&gt;',
      '&lt;link-entity name="systemuserroles" from="roleid" to="roleid"&gt;',
          '&lt;link-entity name="systemuser" from="systemuserid" to="systemuserid"&gt;',
              '&lt;filter&gt;',
                  '&lt;condition attribute="systemuserid" operator="eq-userid"/&gt;',
              '&lt;/filter&gt;',
         ' &lt;/link-entity&gt;',
      '&lt;/link-entity&gt;',
     ' &lt;link-entity name="roleprivileges" from="roleid" to="roleid"&gt;',
         ' &lt;link-entity name="privilege" from="privilegeid" to="privilegeid"&gt;',
             ' &lt;attribute name="canbebasic" /&gt;',
              ' &lt;attribute name="canbedeep" /&gt;',
               ' &lt;attribute name="canbelocal" /&gt;',
                ' &lt;attribute name="canbeglobal" /&gt;',
               '  &lt;attribute name="accessright" /&gt;',
                '&lt;filter type="and"&gt;',
         '&lt;condition attribute="name" operator="eq" value="prvcreate' + entity + '" /&gt;',
         '&lt;/filter&gt;',
              '  &lt;/link-entity&gt;',
           ' &lt;/link-entity&gt;',
        '&lt;/entity&gt;',
   ' &lt;/fetch&gt;'
  </code></pre>
  
  <p>Would somebody please help?</p>