public AuthorityDescriptor GetAuthority(UserInfo user) { var userKey = user.Key; var cAuth = _authorityByUserId.Lookup(userKey); if (cAuth == null) { var roles = _app.GetUserRoles(user); var auth = GetAuthority(roles); cAuth = new AuthorityDescriptor(auth); _authorityByUserId.Add(userKey, cAuth); } return(cAuth); }