score:0

Accepted answer

here is my solution... i've just modified the configuration like this...

auth {
    securityprofiles = [
        {
            operation = "myoperation1"
            roles = ["author", "auditor"]
        }
        {
            operation = "myoperation2"
            roles = ["admin"]
        }
        {
            operation = "myoperationn"
            roles = ["auditor", "default"]
        }
    ]
}

... and then read it with the following code snipper:

import scala.collection.mutable.map

var securityprofiles = map[string, list[string]]().withdefaultvalue(list.empty)
  configuration.getconfiglist("auth.securityprofiles").map { _.tolist.map { config =>
    config.getstring("operation").map { op =>
      securityprofiles += (op -> config.getstringlist("roles").map(_.tolist).getorelse(list.empty))
  }
}}

i hope that helps.


Related Query

More Query from same tag