fix a bug in the retrieval of resource level role annotation

This commit is contained in:
Eckart Hertzler 2009-10-18 22:57:49 +08:00 committed by Jonas Bonér
parent ba61d3cd79
commit 85ff3b2ecd

View file

@ -137,7 +137,7 @@ class AkkaSecurityFilterFactory extends ResourceFilterFactory with Logging {
//Last but not least, the resource-level RolesAllowed
val cra = am.getResource.getAnnotation(classOf[RolesAllowed])
if (cra ne null)
return mkFilter(Some(ra.value.toList))
return mkFilter(Some(cra.value.toList))
return null;
}
@ -389,7 +389,8 @@ trait SpnegoAuthenticationActor extends AuthenticationActor[SpnegoCredentials]
}
override def mkSecurityContext(r : Req,u : UserInfo) : SecurityContext =
mkDefaultSecurityContext(r,u,SecurityContext.CLIENT_CERT_AUTH)
mkDefaultSecurityContext(r,u,SecurityContext.CLIENT_CERT_AUTH) // the security context does not know about spnego/kerberos
// not sure whether to use a constant from the security context or something like "SPNEGO/Kerberos"
/**
* returns the roles for the given user