Spring Security
  1. Spring Security
  2. SEC-1165

Relax the requirement that the ObjectIdentity "type" be a Java class

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 3.0.0 M2
    • Component/s: ACLs
    • Labels:
      None

      Description

      This is really just a piece of metadata to identify the specific domain object type (e.g. Contact) to which an ACL applies. In practice it is converted to a String (the classname) when stored in the database. There's no real requirement that it should be a unique Java class or that the class should be loadable when the ObjectIdentity is created. It would be more flexible if it was just treated as a String.

      The method

      Class<?> getJavaType();

      on the interface should be changed to return a String, and the property should be changed to "type" or "objectType" or something similar.

        Issue Links

          Activity

          Hide
          Luke Taylor added a comment -

          I've updated the method as described, so it is now:

          String getType();

          Corresponding changes in the classes which use it have also been made. These all used the javaType by calling getName() first. ObjectIdentityImpl no longer checks the classpath for the presence of the domain class with this name (since it may not be a class name). This also means that it can be used in situations where the domain object class(es) are not available - e.g. a separate permission administration application.

          Show
          Luke Taylor added a comment - I've updated the method as described, so it is now: String getType(); Corresponding changes in the classes which use it have also been made. These all used the javaType by calling getName() first. ObjectIdentityImpl no longer checks the classpath for the presence of the domain class with this name (since it may not be a class name). This also means that it can be used in situations where the domain object class(es) are not available - e.g. a separate permission administration application.

            People

            • Assignee:
              Luke Taylor
              Reporter:
              Luke Taylor
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: