Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-368

DomainPermission(string, string) constructor sets targets to the same value as actions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2.0
    • 1.2.1
    • None
    • Windows XP SP3, Intel Core2 Duo

    Description

      The DomainPermission(string, string) constructor incorrectly sets the 'targets' field to the value supplied for 'actions':

      055 public DomainPermission(String actions, String targets)

      { 056 this.domain = getDomain(getClass()); 057 this.actions = StringUtils.splitToSet(actions, SUBPART_DIVIDER_TOKEN); 058 this.targets = StringUtils.splitToSet(actions, SUBPART_DIVIDER_TOKEN); 059 encodeParts(this.domain, actions, targets); 060 }

      Attachments

        1. DomainPermission.patch
          0.6 kB
          Ben Johnson
        2. DomainPermissionTest.java
          8 kB
          Ben Johnson
        3. DomainPermission.java
          5 kB
          Ben Johnson

        Activity

          People

            Unassigned Unassigned
            b.johnson Ben Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: