func NewUserManagerAPI( st *state.State, authorizer common.Authorizer, ) (*UserManagerAPI, error) { if !authorizer.AuthClient() { return nil, common.ErrPerm } // TODO(mattyw) - replace stub with real canWrite function getCanWrite := common.AuthAlways(true) return &UserManagerAPI{ state: st, authorizer: authorizer, getCanWrite: getCanWrite}, nil }