I have the following wrapper:
def ProtectedAction[T](f: => T)(implicit user: User): T = {
if(isAuthorized()) f
else {
Logger.warn(user.login + "Had access denied to" + methodsName)
throw new NotAuthorizedException("You do not have permission to execute this operation.")
}
}
I'd like to get the simpleName of the method wich is being held by f. How can I do that?
Aucun commentaire:
Enregistrer un commentaire