Uploaded image for project: 'Sentry'
  1. Sentry
  2. SENTRY-332

A role may got empty privilege, although the role have some privileges

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.0
    • Component/s: None
    • Labels:
      None

      Description

      MSentryPrivilege is an embedded field of MSentryRole, When query a MSentryRole that contains MSentryPrivilege as embedded fields, the embedded field MSentryPrivilege may returned as null.
      For example:

      MSentryRole mRole = getMSentryRole(pm, roleName);
      if (mRole != null) {
           mRole.getPrivileges(); // the privileges may be null, although the role have privileges
      }
      

      Solution:
      JDO defaults to lazy loading ´╝îMSentryPrivilege should be eager-loading .

        Attachments

        1. SENTRY-332.patch
          0.9 kB
          Dapeng Sun

          Activity

            People

            • Assignee:
              dapengsun Dapeng Sun
              Reporter:
              dapengsun Dapeng Sun
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: