Uploaded image for project: 'atlassian-seraph'
  1. atlassian-seraph
  2. SER-32

seraph path service : multiple roles per path

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Medium
    • 0.7.6
    • 0.7.2, 0.7.3, 0.7.5
    • None
    • true

    Description

      Hi,

      Like I mentionned here: http://forums.atlassian.com/thread.jspa?threadID=6306&tstart=0
      It seems this page http://opensource.atlassian.com/seraph/services.html is actually wrong. It would be nice to be able to define multiple roles required for one path like suggested in the example, but this doesn't seem to be implemented. Rather, the current implementation looks for a role called "myapp-administrators, myapp-owners" instead of two roles "myapp-administrators" and "myapp-owners". At least, that's how i understood the docs.

      Just made a small patch for this, hope it's interesting anyone.
      (Its using jdk1.4 String.split method, which is based on regexes. I'm not a fan of regexes, but I've seen in the javadocs that sun decided that it was a better way to go than using StringTokenizer, which btw suprised me pretty much, cause using regexes for such simple things seems overkill !?)

      You can now do something like � � � � <role-name>myapp-administrators,myapp-owners</role-name> and the PathService will actually require the user to have both roles. Roles can be separated by tabs , newlines, semi columns, comas and spaces. Had to do some ugly hack to remove the possible empty strings introduced by the String.split : please improve if you have a better way, it's getting late over here

      Attachments

        Activity

          People

            Unassigned Unassigned
            6b4b1b72e35c Grégory Joseph
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              19 years, 19 weeks, 4 days ago