pub fn check_scope( rec: &Option<Arc<KeyRecord>>, proto_id: u32, needed: Scope, ) -> Result<(), Status>
检查 KeyRecord 是否持有 needed scope
needed