How odd - why dont you just match on the req unapply rather that this awkward 
sub match? 

You need to do something like:

    LiftRules.httpAuthProtectedResource.prepend {
      case Req("restricted" :: _,_,_) => Full(AuthRole("admin"))
    }
    
    LiftRules.authentication = HttpBasicAuthentication("myrealm"){
      case ("admin", "password", req) => {
        userRoles(AuthRole("admin"))
        true
      }
      case (user, pass,_) => Log.warn("Attempted report login with: " + user + 
":" + pass); false
    }

Cheers, Tim

On 6 Feb 2010, at 20:19, aw wrote:

> LiftRules.httpAuthProtectedResource.append {
>  case req :  Req => req.path match {
>    case ParsePath("restricted" :: _, _, _, _) => restrictedRole
>    case _ => Empty
>  }
> }

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to